text: module.exports =
  /******/ (function(modules) { // webpackBootstrap
  /******/ 	// The module cache
  /******/ 	var installedModules = {};
  /******/
  /******/ 	// The require function
  /******/ 	function __webpack_require__(moduleId) {
  /******/
  /******/ 		// Check if module is in cache
  /******/ 		if(installedModules[moduleId]) {
  /******/ 			return installedModules[moduleId].exports;
  /******/ 		}
  /******/ 		// Create a new module (and put it into the cache)
  /******/ 		var module = installedModules[moduleId] = {
  /******/ 			i: moduleId,
  /******/ 			l: false,
  /******/ 			exports: {}
  /******/ 		};
  /******/
  /******/ 		// Execute the module function
  /******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  /******/
  /******/ 		// Flag the module as loaded
  /******/ 		module.l = true;
  /******/
  /******/ 		// Return the exports of the module
  /******/ 		return module.exports;
  /******/ 	}
  /******/
  /******/
  /******/ 	// expose the modules object (__webpack_modules__)
  /******/ 	__webpack_require__.m = modules;
  /******/
  /******/ 	// expose the module cache
  /******/ 	__webpack_require__.c = installedModules;
  /******/
  /******/ 	// define getter function for harmony exports
  /******/ 	__webpack_require__.d = function(exports, name, getter) {
  /******/ 		if(!__webpack_require__.o(exports, name)) {
  /******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
  /******/ 		}
  /******/ 	};
  /******/
  /******/ 	// define __esModule on exports
  /******/ 	__webpack_require__.r = function(exports) {
  /******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  /******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  /******/ 		}
  /******/ 		Object.defineProperty(exports, '__esModule', { value: true });
  /******/ 	};
  /******/
  /******/ 	// create a fake namespace object
  /******/ 	// mode & 1: value is a module id, require it
  /******/ 	// mode & 2: merge all properties of value into the ns
  /******/ 	// mode & 4: return value when already ns object
  /******/ 	// mode & 8|1: behave like require
  /******/ 	__webpack_require__.t = function(value, mode) {
  /******/ 		if(mode & 1) value = __webpack_require__(value);
  /******/ 		if(mode & 8) return value;
  /******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  /******/ 		var ns = Object.create(null);
  /******/ 		__webpack_require__.r(ns);
  /******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  /******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  /******/ 		return ns;
  /******/ 	};
  /******/
  /******/ 	// getDefaultExport function for compatibility with non-harmony modules
  /******/ 	__webpack_require__.n = function(module) {
  /******/ 		var getter = module && module.__esModule ?
  /******/ 			function getDefault() { return module['default']; } :
  /******/ 			function getModuleExports() { return module; };
  /******/ 		__webpack_require__.d(getter, 'a', getter);
  /******/ 		return getter;
  /******/ 	};
  /******/
  /******/ 	// Object.prototype.hasOwnProperty.call
  /******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  /******/
  /******/ 	// __webpack_public_path__
  /******/ 	__webpack_require__.p = "";
  /******/
  /******/
  /******/ 	// Load entry module and return exports
  /******/ 	return __webpack_require__(__webpack_require__.s = "fb15");
  /******/ })
  /************************************************************************/
  /******/ ({
  
  /***/ "01f9":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  var LIBRARY = __webpack_require__("2d00");
  var $export = __webpack_require__("5ca1");
  var redefine = __webpack_require__("2aba");
  var hide = __webpack_require__("32e9");
  var Iterators = __webpack_require__("84f2");
  var $iterCreate = __webpack_require__("41a0");
  var setToStringTag = __webpack_require__("7f20");
  var getPrototypeOf = __webpack_require__("38fd");
  var ITERATOR = __webpack_require__("2b4c")('iterator');
  var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
  var FF_ITERATOR = '@@iterator';
  var KEYS = 'keys';
  var VALUES = 'values';
  
  var returnThis = function () { return this; };
  
  module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
    $iterCreate(Constructor, NAME, next);
    var getMethod = function (kind) {
      if (!BUGGY && kind in proto) return proto[kind];
      switch (kind) {
        case KEYS: return function keys() { return new Constructor(this, kind); };
        case VALUES: return function values() { return new Constructor(this, kind); };
      } return function entries() { return new Constructor(this, kind); };
    };
    var TAG = NAME + ' Iterator';
    var DEF_VALUES = DEFAULT == VALUES;
    var VALUES_BUG = false;
    var proto = Base.prototype;
    var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
    var $default = $native || getMethod(DEFAULT);
    var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
    var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
    var methods, key, IteratorPrototype;
    // Fix native
    if ($anyNative) {
      IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
      if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
        // Set @@toStringTag to native iterators
        setToStringTag(IteratorPrototype, TAG, true);
        // fix for some old engines
        if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
      }
    }
    // fix Array#{values, @@iterator}.name in V8 / FF
    if (DEF_VALUES && $native && $native.name !== VALUES) {
      VALUES_BUG = true;
      $default = function values() { return $native.call(this); };
    }
    // Define iterator
    if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
      hide(proto, ITERATOR, $default);
    }
    // Plug for library
    Iterators[NAME] = $default;
    Iterators[TAG] = returnThis;
    if (DEFAULT) {
      methods = {
        values: DEF_VALUES ? $default : getMethod(VALUES),
        keys: IS_SET ? $default : getMethod(KEYS),
        entries: $entries
      };
      if (FORCED) for (key in methods) {
        if (!(key in proto)) redefine(proto, key, methods[key]);
      } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
    }
    return methods;
  };
  
  
  /***/ }),
  
  /***/ "02f4":
  /***/ (function(module, exports, __webpack_require__) {
  
  var toInteger = __webpack_require__("4588");
  var defined = __webpack_require__("be13");
  // true  -> String#at
  // false -> String#codePointAt
  module.exports = function (TO_STRING) {
    return function (that, pos) {
      var s = String(defined(that));
      var i = toInteger(pos);
      var l = s.length;
      var a, b;
      if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
      a = s.charCodeAt(i);
      return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
        ? TO_STRING ? s.charAt(i) : a
        : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
    };
  };
  
  
  /***/ }),
  
  /***/ "0390":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  var at = __webpack_require__("02f4")(true);
  
   // `AdvanceStringIndex` abstract operation
  // https://tc39.github.io/ecma262/#sec-advancestringindex
  module.exports = function (S, index, unicode) {
    return index + (unicode ? at(S, index).length : 1);
  };
  
  
  /***/ }),
  
  /***/ "097d":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  // https://github.com/tc39/proposal-promise-finally
  
  var $export = __webpack_require__("5ca1");
  var core = __webpack_require__("8378");
  var global = __webpack_require__("7726");
  var speciesConstructor = __webpack_require__("ebd6");
  var promiseResolve = __webpack_require__("bcaa");
  
  $export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {
    var C = speciesConstructor(this, core.Promise || global.Promise);
    var isFunction = typeof onFinally == 'function';
    return this.then(
      isFunction ? function (x) {
        return promiseResolve(C, onFinally()).then(function () { return x; });
      } : onFinally,
      isFunction ? function (e) {
        return promiseResolve(C, onFinally()).then(function () { throw e; });
      } : onFinally
    );
  } });
  
  
  /***/ }),
  
  /***/ "0bfb":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  // 21.2.5.3 get RegExp.prototype.flags
  var anObject = __webpack_require__("cb7c");
  module.exports = function () {
    var that = anObject(this);
    var result = '';
    if (that.global) result += 'g';
    if (that.ignoreCase) result += 'i';
    if (that.multiline) result += 'm';
    if (that.unicode) result += 'u';
    if (that.sticky) result += 'y';
    return result;
  };
  
  
  /***/ }),
  
  /***/ "0d58":
  /***/ (function(module, exports, __webpack_require__) {
  
  // 19.1.2.14 / 15.2.3.14 Object.keys(O)
  var $keys = __webpack_require__("ce10");
  var enumBugKeys = __webpack_require__("e11e");
  
  module.exports = Object.keys || function keys(O) {
    return $keys(O, enumBugKeys);
  };
  
  
  /***/ }),
  
  /***/ "1156":
  /***/ (function(module, exports, __webpack_require__) {
  
  // style-loader: Adds some css to the DOM by adding a <style> tag
  
  // load the styles
  var content = __webpack_require__("ad20");
  if(typeof content === 'string') content = [[module.i, content, '']];
  if(content.locals) module.exports = content.locals;
  // add the styles to the DOM
  var add = __webpack_require__("499e").default
  var update = add("c1ec597e", content, true, {"sourceMap":false,"shadowMode":false});
  
  /***/ }),
  
  /***/ "11e9":
  /***/ (function(module, exports, __webpack_require__) {
  
  var pIE = __webpack_require__("52a7");
  var createDesc = __webpack_require__("4630");
  var toIObject = __webpack_require__("6821");
  var toPrimitive = __webpack_require__("6a99");
  var has = __webpack_require__("69a8");
  var IE8_DOM_DEFINE = __webpack_require__("c69a");
  var gOPD = Object.getOwnPropertyDescriptor;
  
  exports.f = __webpack_require__("9e1e") ? gOPD : function getOwnPropertyDescriptor(O, P) {
    O = toIObject(O);
    P = toPrimitive(P, true);
    if (IE8_DOM_DEFINE) try {
      return gOPD(O, P);
    } catch (e) { /* empty */ }
    if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
  };
  
  
  /***/ }),
  
  /***/ "1495":
  /***/ (function(module, exports, __webpack_require__) {
  
  var dP = __webpack_require__("86cc");
  var anObject = __webpack_require__("cb7c");
  var getKeys = __webpack_require__("0d58");
  
  module.exports = __webpack_require__("9e1e") ? Object.defineProperties : function defineProperties(O, Properties) {
    anObject(O);
    var keys = getKeys(Properties);
    var length = keys.length;
    var i = 0;
    var P;
    while (length > i) dP.f(O, P = keys[i++], Properties[P]);
    return O;
  };
  
  
  /***/ }),
  
  /***/ "18d2":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  /**
   * Resize detection strategy that injects objects to elements in order to detect resize events.
   * Heavily inspired by: http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/
   */
  
  
  
  var browserDetector = __webpack_require__("18e9");
  
  module.exports = function(options) {
      options             = options || {};
      var reporter        = options.reporter;
      var batchProcessor  = options.batchProcessor;
      var getState        = options.stateHandler.getState;
  
      if(!reporter) {
          throw new Error("Missing required dependency: reporter.");
      }
  
      /**
       * Adds a resize event listener to the element.
       * @public
       * @param {element} element The element that should have the listener added.
       * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.
       */
      function addListener(element, listener) {
          function listenerProxy() {
              listener(element);
          }
  
          if(browserDetector.isIE(8)) {
              //IE 8 does not support object, but supports the resize event directly on elements.
              getState(element).object = {
                  proxy: listenerProxy
              };
              element.attachEvent("onresize", listenerProxy);
          } else {
              var object = getObject(element);
  
              if(!object) {
                  throw new Error("Element is not detectable by this strategy.");
              }
  
              object.contentDocument.defaultView.addEventListener("resize", listenerProxy);
          }
      }
  
      function buildCssTextString(rules) {
          var seperator = options.important ? " !important; " : "; ";
  
          return (rules.join(seperator) + seperator).trim();
      }
  
      /**
       * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.
       * @private
       * @param {object} options Optional options object.
       * @param {element} element The element to make detectable
       * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.
       */
      function makeDetectable(options, element, callback) {
          if (!callback) {
              callback = element;
              element = options;
              options = null;
          }
  
          options = options || {};
          var debug = options.debug;
  
          function injectObject(element, callback) {
              var OBJECT_STYLE = buildCssTextString(["display: block", "position: absolute", "top: 0", "left: 0", "width: 100%", "height: 100%", "border: none", "padding: 0", "margin: 0", "opacity: 0", "z-index: -1000", "pointer-events: none"]);
  
              //The target element needs to be positioned (everything except static) so the absolute positioned object will be positioned relative to the target element.
  
              // Position altering may be performed directly or on object load, depending on if style resolution is possible directly or not.
              var positionCheckPerformed = false;
  
              // The element may not yet be attached to the DOM, and therefore the style object may be empty in some browsers.
              // Since the style object is a reference, it will be updated as soon as the element is attached to the DOM.
              var style = window.getComputedStyle(element);
              var width = element.offsetWidth;
              var height = element.offsetHeight;
  
              getState(element).startSize = {
                  width: width,
                  height: height
              };
  
              function mutateDom() {
                  function alterPositionStyles() {
                      if(style.position === "static") {
                          element.style.setProperty("position", "relative", options.important ? "important" : "");
  
                          var removeRelativeStyles = function(reporter, element, style, property) {
                              function getNumericalValue(value) {
                                  return value.replace(/[^-\d\.]/g, "");
                              }
  
                              var value = style[property];
  
                              if(value !== "auto" && getNumericalValue(value) !== "0") {
                                  reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element);
                                  element.style.setProperty(property, "0", options.important ? "important" : "");
                              }
                          };
  
                          //Check so that there are no accidental styles that will make the element styled differently now that is is relative.
                          //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).
                          removeRelativeStyles(reporter, element, style, "top");
                          removeRelativeStyles(reporter, element, style, "right");
                          removeRelativeStyles(reporter, element, style, "bottom");
                          removeRelativeStyles(reporter, element, style, "left");
                      }
                  }
  
                  function onObjectLoad() {
                      // The object has been loaded, which means that the element now is guaranteed to be attached to the DOM.
                      if (!positionCheckPerformed) {
                          alterPositionStyles();
                      }
  
                      /*jshint validthis: true */
  
                      function getDocument(element, callback) {
                          //Opera 12 seem to call the object.onload before the actual document has been created.
                          //So if it is not present, poll it with an timeout until it is present.
                          //TODO: Could maybe be handled better with object.onreadystatechange or similar.
                          if(!element.contentDocument) {
                              setTimeout(function checkForObjectDocument() {
                                  getDocument(element, callback);
                              }, 100);
  
                              return;
                          }
  
                          callback(element.contentDocument);
                      }
  
                      //Mutating the object element here seems to fire another load event.
                      //Mutating the inner document of the object element is fine though.
                      var objectElement = this;
  
                      //Create the style element to be added to the object.
                      getDocument(objectElement, function onObjectDocumentReady(objectDocument) {
                          //Notify that the element is ready to be listened to.
                          callback(element);
                      });
                  }
  
                  // The element may be detached from the DOM, and some browsers does not support style resolving of detached elements.
                  // The alterPositionStyles needs to be delayed until we know the element has been attached to the DOM (which we are sure of when the onObjectLoad has been fired), if style resolution is not possible.
                  if (style.position !== "") {
                      alterPositionStyles(style);
                      positionCheckPerformed = true;
                  }
  
                  //Add an object element as a child to the target element that will be listened to for resize events.
                  var object = document.createElement("object");
                  object.style.cssText = OBJECT_STYLE;
                  object.tabIndex = -1;
                  object.type = "text/html";
                  object.onload = onObjectLoad;
  
                  //Safari: This must occur before adding the object to the DOM.
                  //IE: Does not like that this happens before, even if it is also added after.
                  if(!browserDetector.isIE()) {
                      object.data = "about:blank";
                  }
  
                  if (!getState(element)) {
                      // The element has been uninstalled before the actual loading happened.
                      return;
                  }
  
                  element.appendChild(object);
                  getState(element).object = object;
  
                  //IE: This must occur after adding the object to the DOM.
                  if(browserDetector.isIE()) {
                      object.data = "about:blank";
                  }
              }
  
              if(batchProcessor) {
                  batchProcessor.add(mutateDom);
              } else {
                  mutateDom();
              }
          }
  
          if(browserDetector.isIE(8)) {
              //IE 8 does not support objects properly. Luckily they do support the resize event.
              //So do not inject the object and notify that the element is already ready to be listened to.
              //The event handler for the resize event is attached in the utils.addListener instead.
              callback(element);
          } else {
              injectObject(element, callback);
          }
      }
  
      /**
       * Returns the child object of the target element.
       * @private
       * @param {element} element The target element.
       * @returns The object element of the target.
       */
      function getObject(element) {
          return getState(element).object;
      }
  
      function uninstall(element) {
          if (!getState(element)) {
              return;
          }
  
          var object = getObject(element);
  
          if (!object) {
              return;
          }
  
          if (browserDetector.isIE(8)) {
              element.detachEvent("onresize", object.proxy);
          } else {
              element.removeChild(object);
          }
          delete getState(element).object;
      }
  
      return {
          makeDetectable: makeDetectable,
          addListener: addListener,
          uninstall: uninstall
      };
  };
  
  
  /***/ }),
  
  /***/ "18e9":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  
  var detector = module.exports = {};
  
  detector.isIE = function(version) {
      function isAnyIeVersion() {
          var agent = navigator.userAgent.toLowerCase();
          return agent.indexOf("msie") !== -1 || agent.indexOf("trident") !== -1 || agent.indexOf(" edge/") !== -1;
      }
  
      if(!isAnyIeVersion()) {
          return false;
      }
  
      if(!version) {
          return true;
      }
  
      //Shamelessly stolen from https://gist.github.com/padolsey/527683
      var ieVersion = (function(){
          var undef,
              v = 3,
              div = document.createElement("div"),
              all = div.getElementsByTagName("i");
  
          do {
              div.innerHTML = "<!--[if gt IE " + (++v) + "]><i></i><![endif]-->";
          }
          while (all[0]);
  
          return v > 4 ? v : undef;
      }());
  
      return version === ieVersion;
  };
  
  detector.isLegacyOpera = function() {
      return !!window.opera;
  };
  
  
  /***/ }),
  
  /***/ "1991":
  /***/ (function(module, exports, __webpack_require__) {
  
  var ctx = __webpack_require__("9b43");
  var invoke = __webpack_require__("31f4");
  var html = __webpack_require__("fab2");
  var cel = __webpack_require__("230e");
  var global = __webpack_require__("7726");
  var process = global.process;
  var setTask = global.setImmediate;
  var clearTask = global.clearImmediate;
  var MessageChannel = global.MessageChannel;
  var Dispatch = global.Dispatch;
  var counter = 0;
  var queue = {};
  var ONREADYSTATECHANGE = 'onreadystatechange';
  var defer, channel, port;
  var run = function () {
    var id = +this;
    // eslint-disable-next-line no-prototype-builtins
    if (queue.hasOwnProperty(id)) {
      var fn = queue[id];
      delete queue[id];
      fn();
    }
  };
  var listener = function (event) {
    run.call(event.data);
  };
  // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
  if (!setTask || !clearTask) {
    setTask = function setImmediate(fn) {
      var args = [];
      var i = 1;
      while (arguments.length > i) args.push(arguments[i++]);
      queue[++counter] = function () {
        // eslint-disable-next-line no-new-func
        invoke(typeof fn == 'function' ? fn : Function(fn), args);
      };
      defer(counter);
      return counter;
    };
    clearTask = function clearImmediate(id) {
      delete queue[id];
    };
    // Node.js 0.8-
    if (__webpack_require__("2d95")(process) == 'process') {
      defer = function (id) {
        process.nextTick(ctx(run, id, 1));
      };
    // Sphere (JS game engine) Dispatch API
    } else if (Dispatch && Dispatch.now) {
      defer = function (id) {
        Dispatch.now(ctx(run, id, 1));
      };
    // Browsers with MessageChannel, includes WebWorkers
    } else if (MessageChannel) {
      channel = new MessageChannel();
      port = channel.port2;
      channel.port1.onmessage = listener;
      defer = ctx(port.postMessage, port, 1);
    // Browsers with postMessage, skip WebWorkers
    // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
    } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {
      defer = function (id) {
        global.postMessage(id + '', '*');
      };
      global.addEventListener('message', listener, false);
    // IE8-
    } else if (ONREADYSTATECHANGE in cel('script')) {
      defer = function (id) {
        html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {
          html.removeChild(this);
          run.call(id);
        };
      };
    // Rest old browsers
    } else {
      defer = function (id) {
        setTimeout(ctx(run, id, 1), 0);
      };
    }
  }
  module.exports = {
    set: setTask,
    clear: clearTask
  };
  
  
  /***/ }),
  
  /***/ "1fa8":
  /***/ (function(module, exports, __webpack_require__) {
  
  // call something on iterator step with safe closing on error
  var anObject = __webpack_require__("cb7c");
  module.exports = function (iterator, fn, value, entries) {
    try {
      return entries ? fn(anObject(value)[0], value[1]) : fn(value);
    // 7.4.6 IteratorClose(iterator, completion)
    } catch (e) {
      var ret = iterator['return'];
      if (ret !== undefined) anObject(ret.call(iterator));
      throw e;
    }
  };
  
  
  /***/ }),
  
  /***/ "214f":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  __webpack_require__("b0c5");
  var redefine = __webpack_require__("2aba");
  var hide = __webpack_require__("32e9");
  var fails = __webpack_require__("79e5");
  var defined = __webpack_require__("be13");
  var wks = __webpack_require__("2b4c");
  var regexpExec = __webpack_require__("520a");
  
  var SPECIES = wks('species');
  
  var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
    // #replace needs built-in support for named groups.
    // #match works fine because it just return the exec results, even if it has
    // a "grops" property.
    var re = /./;
    re.exec = function () {
      var result = [];
      result.groups = { a: '7' };
      return result;
    };
    return ''.replace(re, '$<a>') !== '7';
  });
  
  var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () {
    // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
    var re = /(?:)/;
    var originalExec = re.exec;
    re.exec = function () { return originalExec.apply(this, arguments); };
    var result = 'ab'.split(re);
    return result.length === 2 && result[0] === 'a' && result[1] === 'b';
  })();
  
  module.exports = function (KEY, length, exec) {
    var SYMBOL = wks(KEY);
  
    var DELEGATES_TO_SYMBOL = !fails(function () {
      // String methods call symbol-named RegEp methods
      var O = {};
      O[SYMBOL] = function () { return 7; };
      return ''[KEY](O) != 7;
    });
  
    var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () {
      // Symbol-named RegExp methods call .exec
      var execCalled = false;
      var re = /a/;
      re.exec = function () { execCalled = true; return null; };
      if (KEY === 'split') {
        // RegExp[@@split] doesn't call the regex's exec method, but first creates
        // a new one. We need to return the patched regex when creating the new one.
        re.constructor = {};
        re.constructor[SPECIES] = function () { return re; };
      }
      re[SYMBOL]('');
      return !execCalled;
    }) : undefined;
  
    if (
      !DELEGATES_TO_SYMBOL ||
      !DELEGATES_TO_EXEC ||
      (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
      (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
    ) {
      var nativeRegExpMethod = /./[SYMBOL];
      var fns = exec(
        defined,
        SYMBOL,
        ''[KEY],
        function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) {
          if (regexp.exec === regexpExec) {
            if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
              // The native String method already delegates to @@method (this
              // polyfilled function), leasing to infinite recursion.
              // We avoid it by directly calling the native @@method method.
              return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
            }
            return { done: true, value: nativeMethod.call(str, regexp, arg2) };
          }
          return { done: false };
        }
      );
      var strfn = fns[0];
      var rxfn = fns[1];
  
      redefine(String.prototype, KEY, strfn);
      hide(RegExp.prototype, SYMBOL, length == 2
        // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
        // 21.2.5.11 RegExp.prototype[@@split](string, limit)
        ? function (string, arg) { return rxfn.call(string, this, arg); }
        // 21.2.5.6 RegExp.prototype[@@match](string)
        // 21.2.5.9 RegExp.prototype[@@search](string)
        : function (string) { return rxfn.call(string, this); }
      );
    }
  };
  
  
  /***/ }),
  
  /***/ "230e":
  /***/ (function(module, exports, __webpack_require__) {
  
  var isObject = __webpack_require__("d3f4");
  var document = __webpack_require__("7726").document;
  // typeof document.createElement is 'object' in old IE
  var is = isObject(document) && isObject(document.createElement);
  module.exports = function (it) {
    return is ? document.createElement(it) : {};
  };
  
  
  /***/ }),
  
  /***/ "2350":
  /***/ (function(module, exports) {
  
  /*
  	MIT License http://www.opensource.org/licenses/mit-license.php
  	Author Tobias Koppers @sokra
  */
  // css base code, injected by the css-loader
  module.exports = function(useSourceMap) {
  	var list = [];
  
  	// return the list of modules as css string
  	list.toString = function toString() {
  		return this.map(function (item) {
  			var content = cssWithMappingToString(item, useSourceMap);
  			if(item[2]) {
  				return "@media " + item[2] + "{" + content + "}";
  			} else {
  				return content;
  			}
  		}).join("");
  	};
  
  	// import a list of modules into the list
  	list.i = function(modules, mediaQuery) {
  		if(typeof modules === "string")
  			modules = [[null, modules, ""]];
  		var alreadyImportedModules = {};
  		for(var i = 0; i < this.length; i++) {
  			var id = this[i][0];
  			if(typeof id === "number")
  				alreadyImportedModules[id] = true;
  		}
  		for(i = 0; i < modules.length; i++) {
  			var item = modules[i];
  			// skip already imported module
  			// this implementation is not 100% perfect for weird media query combinations
  			//  when a module is imported multiple times with different media queries.
  			//  I hope this will never occur (Hey this way we have smaller bundles)
  			if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
  				if(mediaQuery && !item[2]) {
  					item[2] = mediaQuery;
  				} else if(mediaQuery) {
  					item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
  				}
  				list.push(item);
  			}
  		}
  	};
  	return list;
  };
  
  function cssWithMappingToString(item, useSourceMap) {
  	var content = item[1] || '';
  	var cssMapping = item[3];
  	if (!cssMapping) {
  		return content;
  	}
  
  	if (useSourceMap && typeof btoa === 'function') {
  		var sourceMapping = toComment(cssMapping);
  		var sourceURLs = cssMapping.sources.map(function (source) {
  			return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'
  		});
  
  		return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  	}
  
  	return [content].join('\n');
  }
  
  // Adapted from convert-source-map (MIT)
  function toComment(sourceMap) {
  	// eslint-disable-next-line no-undef
  	var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  	var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
  
  	return '/*# ' + data + ' */';
  }
  
  
  /***/ }),
  
  /***/ "23c6":
  /***/ (function(module, exports, __webpack_require__) {
  
  // getting tag from 19.1.3.6 Object.prototype.toString()
  var cof = __webpack_require__("2d95");
  var TAG = __webpack_require__("2b4c")('toStringTag');
  // ES3 wrong here
  var ARG = cof(function () { return arguments; }()) == 'Arguments';
  
  // fallback for IE11 Script Access Denied error
  var tryGet = function (it, key) {
    try {
      return it[key];
    } catch (e) { /* empty */ }
  };
  
  module.exports = function (it) {
    var O, T, B;
    return it === undefined ? 'Undefined' : it === null ? 'Null'
      // @@toStringTag case
      : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
      // builtinTag case
      : ARG ? cof(O)
      // ES3 arguments fallback
      : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
  };
  
  
  /***/ }),
  
  /***/ "2621":
  /***/ (function(module, exports) {
  
  exports.f = Object.getOwnPropertySymbols;
  
  
  /***/ }),
  
  /***/ "27ee":
  /***/ (function(module, exports, __webpack_require__) {
  
  var classof = __webpack_require__("23c6");
  var ITERATOR = __webpack_require__("2b4c")('iterator');
  var Iterators = __webpack_require__("84f2");
  module.exports = __webpack_require__("8378").getIteratorMethod = function (it) {
    if (it != undefined) return it[ITERATOR]
      || it['@@iterator']
      || Iterators[classof(it)];
  };
  
  
  /***/ }),
  
  /***/ "2aba":
  /***/ (function(module, exports, __webpack_require__) {
  
  var global = __webpack_require__("7726");
  var hide = __webpack_require__("32e9");
  var has = __webpack_require__("69a8");
  var SRC = __webpack_require__("ca5a")('src');
  var TO_STRING = 'toString';
  var $toString = Function[TO_STRING];
  var TPL = ('' + $toString).split(TO_STRING);
  
  __webpack_require__("8378").inspectSource = function (it) {
    return $toString.call(it);
  };
  
  (module.exports = function (O, key, val, safe) {
    var isFunction = typeof val == 'function';
    if (isFunction) has(val, 'name') || hide(val, 'name', key);
    if (O[key] === val) return;
    if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
    if (O === global) {
      O[key] = val;
    } else if (!safe) {
      delete O[key];
      hide(O, key, val);
    } else if (O[key]) {
      O[key] = val;
    } else {
      hide(O, key, val);
    }
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  })(Function.prototype, TO_STRING, function toString() {
    return typeof this == 'function' && this[SRC] || $toString.call(this);
  });
  
  
  /***/ }),
  
  /***/ "2aeb":
  /***/ (function(module, exports, __webpack_require__) {
  
  // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  var anObject = __webpack_require__("cb7c");
  var dPs = __webpack_require__("1495");
  var enumBugKeys = __webpack_require__("e11e");
  var IE_PROTO = __webpack_require__("613b")('IE_PROTO');
  var Empty = function () { /* empty */ };
  var PROTOTYPE = 'prototype';
  
  // Create object with fake `null` prototype: use iframe Object with cleared prototype
  var createDict = function () {
    // Thrash, waste and sodomy: IE GC bug
    var iframe = __webpack_require__("230e")('iframe');
    var i = enumBugKeys.length;
    var lt = '<';
    var gt = '>';
    var iframeDocument;
    iframe.style.display = 'none';
    __webpack_require__("fab2").appendChild(iframe);
    iframe.src = 'javascript:'; // eslint-disable-line no-script-url
    // createDict = iframe.contentWindow.Object;
    // html.removeChild(iframe);
    iframeDocument = iframe.contentWindow.document;
    iframeDocument.open();
    iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
    iframeDocument.close();
    createDict = iframeDocument.F;
    while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
    return createDict();
  };
  
  module.exports = Object.create || function create(O, Properties) {
    var result;
    if (O !== null) {
      Empty[PROTOTYPE] = anObject(O);
      result = new Empty();
      Empty[PROTOTYPE] = null;
      // add "__proto__" for Object.getPrototypeOf polyfill
      result[IE_PROTO] = O;
    } else result = createDict();
    return Properties === undefined ? result : dPs(result, Properties);
  };
  
  
  /***/ }),
  
  /***/ "2b4c":
  /***/ (function(module, exports, __webpack_require__) {
  
  var store = __webpack_require__("5537")('wks');
  var uid = __webpack_require__("ca5a");
  var Symbol = __webpack_require__("7726").Symbol;
  var USE_SYMBOL = typeof Symbol == 'function';
  
  var $exports = module.exports = function (name) {
    return store[name] || (store[name] =
      USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
  };
  
  $exports.store = store;
  
  
  /***/ }),
  
  /***/ "2cef":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  
  module.exports = function() {
      var idCount = 1;
  
      /**
       * Generates a new unique id in the context.
       * @public
       * @returns {number} A unique id in the context.
       */
      function generate() {
          return idCount++;
      }
  
      return {
          generate: generate
      };
  };
  
  
  /***/ }),
  
  /***/ "2d00":
  /***/ (function(module, exports) {
  
  module.exports = false;
  
  
  /***/ }),
  
  /***/ "2d95":
  /***/ (function(module, exports) {
  
  var toString = {}.toString;
  
  module.exports = function (it) {
    return toString.call(it).slice(8, -1);
  };
  
  
  /***/ }),
  
  /***/ "2f21":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  var fails = __webpack_require__("79e5");
  
  module.exports = function (method, arg) {
    return !!method && fails(function () {
      // eslint-disable-next-line no-useless-call
      arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);
    });
  };
  
  
  /***/ }),
  
  /***/ "31f4":
  /***/ (function(module, exports) {
  
  // fast apply, http://jsperf.lnkit.com/fast-apply/5
  module.exports = function (fn, args, that) {
    var un = that === undefined;
    switch (args.length) {
      case 0: return un ? fn()
                        : fn.call(that);
      case 1: return un ? fn(args[0])
                        : fn.call(that, args[0]);
      case 2: return un ? fn(args[0], args[1])
                        : fn.call(that, args[0], args[1]);
      case 3: return un ? fn(args[0], args[1], args[2])
                        : fn.call(that, args[0], args[1], args[2]);
      case 4: return un ? fn(args[0], args[1], args[2], args[3])
                        : fn.call(that, args[0], args[1], args[2], args[3]);
    } return fn.apply(that, args);
  };
  
  
  /***/ }),
  
  /***/ "32e9":
  /***/ (function(module, exports, __webpack_require__) {
  
  var dP = __webpack_require__("86cc");
  var createDesc = __webpack_require__("4630");
  module.exports = __webpack_require__("9e1e") ? function (object, key, value) {
    return dP.f(object, key, createDesc(1, value));
  } : function (object, key, value) {
    object[key] = value;
    return object;
  };
  
  
  /***/ }),
  
  /***/ "33a4":
  /***/ (function(module, exports, __webpack_require__) {
  
  // check on default Array iterator
  var Iterators = __webpack_require__("84f2");
  var ITERATOR = __webpack_require__("2b4c")('iterator');
  var ArrayProto = Array.prototype;
  
  module.exports = function (it) {
    return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
  };
  
  
  /***/ }),
  
  /***/ "38fd":
  /***/ (function(module, exports, __webpack_require__) {
  
  // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
  var has = __webpack_require__("69a8");
  var toObject = __webpack_require__("4bf8");
  var IE_PROTO = __webpack_require__("613b")('IE_PROTO');
  var ObjectProto = Object.prototype;
  
  module.exports = Object.getPrototypeOf || function (O) {
    O = toObject(O);
    if (has(O, IE_PROTO)) return O[IE_PROTO];
    if (typeof O.constructor == 'function' && O instanceof O.constructor) {
      return O.constructor.prototype;
    } return O instanceof Object ? ObjectProto : null;
  };
  
  
  /***/ }),
  
  /***/ "41a0":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  var create = __webpack_require__("2aeb");
  var descriptor = __webpack_require__("4630");
  var setToStringTag = __webpack_require__("7f20");
  var IteratorPrototype = {};
  
  // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
  __webpack_require__("32e9")(IteratorPrototype, __webpack_require__("2b4c")('iterator'), function () { return this; });
  
  module.exports = function (Constructor, NAME, next) {
    Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
    setToStringTag(Constructor, NAME + ' Iterator');
  };
  
  
  /***/ }),
  
  /***/ "456d":
  /***/ (function(module, exports, __webpack_require__) {
  
  // 19.1.2.14 Object.keys(O)
  var toObject = __webpack_require__("4bf8");
  var $keys = __webpack_require__("0d58");
  
  __webpack_require__("5eda")('keys', function () {
    return function keys(it) {
      return $keys(toObject(it));
    };
  });
  
  
  /***/ }),
  
  /***/ "4588":
  /***/ (function(module, exports) {
  
  // 7.1.4 ToInteger
  var ceil = Math.ceil;
  var floor = Math.floor;
  module.exports = function (it) {
    return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
  };
  
  
  /***/ }),
  
  /***/ "4630":
  /***/ (function(module, exports) {
  
  module.exports = function (bitmap, value) {
    return {
      enumerable: !(bitmap & 1),
      configurable: !(bitmap & 2),
      writable: !(bitmap & 4),
      value: value
    };
  };
  
  
  /***/ }),
  
  /***/ "499e":
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  __webpack_require__.r(__webpack_exports__);
  
  // CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/listToStyles.js
  /**
   * Translates the list format produced by css-loader into something
   * easier to manipulate.
   */
  function listToStyles (parentId, list) {
    var styles = []
    var newStyles = {}
    for (var i = 0; i < list.length; i++) {
      var item = list[i]
      var id = item[0]
      var css = item[1]
      var media = item[2]
      var sourceMap = item[3]
      var part = {
        id: parentId + ':' + i,
        css: css,
        media: media,
        sourceMap: sourceMap
      }
      if (!newStyles[id]) {
        styles.push(newStyles[id] = { id: id, parts: [part] })
      } else {
        newStyles[id].parts.push(part)
      }
    }
    return styles
  }
  
  // CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/addStylesClient.js
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addStylesClient; });
  /*
    MIT License http://www.opensource.org/licenses/mit-license.php
    Author Tobias Koppers @sokra
    Modified by Evan You @yyx990803
  */
  
  
  
  var hasDocument = typeof document !== 'undefined'
  
  if (typeof DEBUG !== 'undefined' && DEBUG) {
    if (!hasDocument) {
      throw new Error(
      'vue-style-loader cannot be used in a non-browser environment. ' +
      "Use { target: 'node' } in your Webpack config to indicate a server-rendering environment."
    ) }
  }
  
  /*
  type StyleObject = {
    id: number;
    parts: Array<StyleObjectPart>
  }
  
  type StyleObjectPart = {
    css: string;
    media: string;
    sourceMap: ?string
  }
  */
  
  var stylesInDom = {/*
    [id: number]: {
      id: number,
      refs: number,
      parts: Array<(obj?: StyleObjectPart) => void>
    }
  */}
  
  var head = hasDocument && (document.head || document.getElementsByTagName('head')[0])
  var singletonElement = null
  var singletonCounter = 0
  var isProduction = false
  var noop = function () {}
  var options = null
  var ssrIdKey = 'data-vue-ssr-id'
  
  // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  // tags it will allow on a page
  var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase())
  
  function addStylesClient (parentId, list, _isProduction, _options) {
    isProduction = _isProduction
  
    options = _options || {}
  
    var styles = listToStyles(parentId, list)
    addStylesToDom(styles)
  
    return function update (newList) {
      var mayRemove = []
      for (var i = 0; i < styles.length; i++) {
        var item = styles[i]
        var domStyle = stylesInDom[item.id]
        domStyle.refs--
        mayRemove.push(domStyle)
      }
      if (newList) {
        styles = listToStyles(parentId, newList)
        addStylesToDom(styles)
      } else {
        styles = []
      }
      for (var i = 0; i < mayRemove.length; i++) {
        var domStyle = mayRemove[i]
        if (domStyle.refs === 0) {
          for (var j = 0; j < domStyle.parts.length; j++) {
            domStyle.parts[j]()
          }
          delete stylesInDom[domStyle.id]
        }
      }
    }
  }
  
  function addStylesToDom (styles /* Array<StyleObject> */) {
    for (var i = 0; i < styles.length; i++) {
      var item = styles[i]
      var domStyle = stylesInDom[item.id]
      if (domStyle) {
        domStyle.refs++
        for (var j = 0; j < domStyle.parts.length; j++) {
          domStyle.parts[j](item.parts[j])
        }
        for (; j < item.parts.length; j++) {
          domStyle.parts.push(addStyle(item.parts[j]))
        }
        if (domStyle.parts.length > item.parts.length) {
          domStyle.parts.length = item.parts.length
        }
      } else {
        var parts = []
        for (var j = 0; j < item.parts.length; j++) {
          parts.push(addStyle(item.parts[j]))
        }
        stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }
      }
    }
  }
  
  function createStyleElement () {
    var styleElement = document.createElement('style')
    styleElement.type = 'text/css'
    head.appendChild(styleElement)
    return styleElement
  }
  
  function addStyle (obj /* StyleObjectPart */) {
    var update, remove
    var styleElement = document.querySelector('style[' + ssrIdKey + '~="' + obj.id + '"]')
  
    if (styleElement) {
      if (isProduction) {
        // has SSR styles and in production mode.
        // simply do nothing.
        return noop
      } else {
        // has SSR styles but in dev mode.
        // for some reason Chrome can't handle source map in server-rendered
        // style tags - source maps in <style> only works if the style tag is
        // created and inserted dynamically. So we remove the server rendered
        // styles and inject new ones.
        styleElement.parentNode.removeChild(styleElement)
      }
    }
  
    if (isOldIE) {
      // use singleton mode for IE9.
      var styleIndex = singletonCounter++
      styleElement = singletonElement || (singletonElement = createStyleElement())
      update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)
      remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)
    } else {
      // use multi-style-tag mode in all other cases
      styleElement = createStyleElement()
      update = applyToTag.bind(null, styleElement)
      remove = function () {
        styleElement.parentNode.removeChild(styleElement)
      }
    }
  
    update(obj)
  
    return function updateStyle (newObj /* StyleObjectPart */) {
      if (newObj) {
        if (newObj.css === obj.css &&
            newObj.media === obj.media &&
            newObj.sourceMap === obj.sourceMap) {
          return
        }
        update(obj = newObj)
      } else {
        remove()
      }
    }
  }
  
  var replaceText = (function () {
    var textStore = []
  
    return function (index, replacement) {
      textStore[index] = replacement
      return textStore.filter(Boolean).join('\n')
    }
  })()
  
  function applyToSingletonTag (styleElement, index, remove, obj) {
    var css = remove ? '' : obj.css
  
    if (styleElement.styleSheet) {
      styleElement.styleSheet.cssText = replaceText(index, css)
    } else {
      var cssNode = document.createTextNode(css)
      var childNodes = styleElement.childNodes
      if (childNodes[index]) styleElement.removeChild(childNodes[index])
      if (childNodes.length) {
        styleElement.insertBefore(cssNode, childNodes[index])
      } else {
        styleElement.appendChild(cssNode)
      }
    }
  }
  
  function applyToTag (styleElement, obj) {
    var css = obj.css
    var media = obj.media
    var sourceMap = obj.sourceMap
  
    if (media) {
      styleElement.setAttribute('media', media)
    }
    if (options.ssrId) {
      styleElement.setAttribute(ssrIdKey, obj.id)
    }
  
    if (sourceMap) {
      // https://developer.chrome.com/devtools/docs/javascript-debugging
      // this makes source maps inside style tags work properly in Chrome
      css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */'
      // http://stackoverflow.com/a/26603875
      css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'
    }
  
    if (styleElement.styleSheet) {
      styleElement.styleSheet.cssText = css
    } else {
      while (styleElement.firstChild) {
        styleElement.removeChild(styleElement.firstChild)
      }
      styleElement.appendChild(document.createTextNode(css))
    }
  }
  
  
  /***/ }),
  
  /***/ "49ad":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  
  module.exports = function(idHandler) {
      var eventListeners = {};
  
      /**
       * Gets all listeners for the given element.
       * @public
       * @param {element} element The element to get all listeners for.
       * @returns All listeners for the given element.
       */
      function getListeners(element) {
          var id = idHandler.get(element);
  
          if (id === undefined) {
              return [];
          }
  
          return eventListeners[id] || [];
      }
  
      /**
       * Stores the given listener for the given element. Will not actually add the listener to the element.
       * @public
       * @param {element} element The element that should have the listener added.
       * @param {function} listener The callback that the element has added.
       */
      function addListener(element, listener) {
          var id = idHandler.get(element);
  
          if(!eventListeners[id]) {
              eventListeners[id] = [];
          }
  
          eventListeners[id].push(listener);
      }
  
      function removeListener(element, listener) {
          var listeners = getListeners(element);
          for (var i = 0, len = listeners.length; i < len; ++i) {
              if (listeners[i] === listener) {
                listeners.splice(i, 1);
                break;
              }
          }
      }
  
      function removeAllListeners(element) {
        var listeners = getListeners(element);
        if (!listeners) { return; }
        listeners.length = 0;
      }
  
      return {
          get: getListeners,
          add: addListener,
          removeListener: removeListener,
          removeAllListeners: removeAllListeners
      };
  };
  
  
  /***/ }),
  
  /***/ "4a59":
  /***/ (function(module, exports, __webpack_require__) {
  
  var ctx = __webpack_require__("9b43");
  var call = __webpack_require__("1fa8");
  var isArrayIter = __webpack_require__("33a4");
  var anObject = __webpack_require__("cb7c");
  var toLength = __webpack_require__("9def");
  var getIterFn = __webpack_require__("27ee");
  var BREAK = {};
  var RETURN = {};
  var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
    var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);
    var f = ctx(fn, that, entries ? 2 : 1);
    var index = 0;
    var length, step, iterator, result;
    if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
    // fast case for arrays with default iterator
    if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {
      result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
      if (result === BREAK || result === RETURN) return result;
    } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
      result = call(iterator, f, step.value, entries);
      if (result === BREAK || result === RETURN) return result;
    }
  };
  exports.BREAK = BREAK;
  exports.RETURN = RETURN;
  
  
  /***/ }),
  
  /***/ "4bf8":
  /***/ (function(module, exports, __webpack_require__) {
  
  // 7.1.13 ToObject(argument)
  var defined = __webpack_require__("be13");
  module.exports = function (it) {
    return Object(defined(it));
  };
  
  
  /***/ }),
  
  /***/ "5058":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  
  module.exports = function(options) {
      var idGenerator     = options.idGenerator;
      var getState        = options.stateHandler.getState;
  
      /**
       * Gets the resize detector id of the element.
       * @public
       * @param {element} element The target element to get the id of.
       * @returns {string|number|null} The id of the element. Null if it has no id.
       */
      function getId(element) {
          var state = getState(element);
  
          if (state && state.id !== undefined) {
              return state.id;
          }
  
          return null;
      }
  
      /**
       * Sets the resize detector id of the element. Requires the element to have a resize detector state initialized.
       * @public
       * @param {element} element The target element to set the id of.
       * @returns {string|number|null} The id of the element.
       */
      function setId(element) {
          var state = getState(element);
  
          if (!state) {
              throw new Error("setId required the element to have a resize detection state.");
          }
  
          var id = idGenerator.generate();
  
          state.id = id;
  
          return id;
      }
  
      return {
          get: getId,
          set: setId
      };
  };
  
  
  /***/ }),
  
  /***/ "50bf":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  
  var utils = module.exports = {};
  
  utils.getOption = getOption;
  
  function getOption(options, name, defaultValue) {
      var value = options[name];
  
      if((value === undefined || value === null) && defaultValue !== undefined) {
          return defaultValue;
      }
  
      return value;
  }
  
  
  /***/ }),
  
  /***/ "520a":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  
  var regexpFlags = __webpack_require__("0bfb");
  
  var nativeExec = RegExp.prototype.exec;
  // This always refers to the native implementation, because the
  // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
  // which loads this file before patching the method.
  var nativeReplace = String.prototype.replace;
  
  var patchedExec = nativeExec;
  
  var LAST_INDEX = 'lastIndex';
  
  var UPDATES_LAST_INDEX_WRONG = (function () {
    var re1 = /a/,
        re2 = /b*/g;
    nativeExec.call(re1, 'a');
    nativeExec.call(re2, 'a');
    return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;
  })();
  
  // nonparticipating capturing group, copied from es5-shim's String#split patch.
  var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  
  var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
  
  if (PATCH) {
    patchedExec = function exec(str) {
      var re = this;
      var lastIndex, reCopy, match, i;
  
      if (NPCG_INCLUDED) {
        reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
      }
      if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];
  
      match = nativeExec.call(re, str);
  
      if (UPDATES_LAST_INDEX_WRONG && match) {
        re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;
      }
      if (NPCG_INCLUDED && match && match.length > 1) {
        // Fix browsers whose `exec` methods don't consistently return `undefined`
        // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
        // eslint-disable-next-line no-loop-func
        nativeReplace.call(match[0], reCopy, function () {
          for (i = 1; i < arguments.length - 2; i++) {
            if (arguments[i] === undefined) match[i] = undefined;
          }
        });
      }
  
      return match;
    };
  }
  
  module.exports = patchedExec;
  
  
  /***/ }),
  
  /***/ "52a7":
  /***/ (function(module, exports) {
  
  exports.f = {}.propertyIsEnumerable;
  
  
  /***/ }),
  
  /***/ "551c":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  var LIBRARY = __webpack_require__("2d00");
  var global = __webpack_require__("7726");
  var ctx = __webpack_require__("9b43");
  var classof = __webpack_require__("23c6");
  var $export = __webpack_require__("5ca1");
  var isObject = __webpack_require__("d3f4");
  var aFunction = __webpack_require__("d8e8");
  var anInstance = __webpack_require__("f605");
  var forOf = __webpack_require__("4a59");
  var speciesConstructor = __webpack_require__("ebd6");
  var task = __webpack_require__("1991").set;
  var microtask = __webpack_require__("8079")();
  var newPromiseCapabilityModule = __webpack_require__("a5b8");
  var perform = __webpack_require__("9c80");
  var userAgent = __webpack_require__("a25f");
  var promiseResolve = __webpack_require__("bcaa");
  var PROMISE = 'Promise';
  var TypeError = global.TypeError;
  var process = global.process;
  var versions = process && process.versions;
  var v8 = versions && versions.v8 || '';
  var $Promise = global[PROMISE];
  var isNode = classof(process) == 'process';
  var empty = function () { /* empty */ };
  var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
  var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;
  
  var USE_NATIVE = !!function () {
    try {
      // correct subclassing with @@species support
      var promise = $Promise.resolve(1);
      var FakePromise = (promise.constructor = {})[__webpack_require__("2b4c")('species')] = function (exec) {
        exec(empty, empty);
      };
      // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
      return (isNode || typeof PromiseRejectionEvent == 'function')
        && promise.then(empty) instanceof FakePromise
        // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
        // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
        // we can't detect it synchronously, so just check versions
        && v8.indexOf('6.6') !== 0
        && userAgent.indexOf('Chrome/66') === -1;
    } catch (e) { /* empty */ }
  }();
  
  // helpers
  var isThenable = function (it) {
    var then;
    return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
  };
  var notify = function (promise, isReject) {
    if (promise._n) return;
    promise._n = true;
    var chain = promise._c;
    microtask(function () {
      var value = promise._v;
      var ok = promise._s == 1;
      var i = 0;
      var run = function (reaction) {
        var handler = ok ? reaction.ok : reaction.fail;
        var resolve = reaction.resolve;
        var reject = reaction.reject;
        var domain = reaction.domain;
        var result, then, exited;
        try {
          if (handler) {
            if (!ok) {
              if (promise._h == 2) onHandleUnhandled(promise);
              promise._h = 1;
            }
            if (handler === true) result = value;
            else {
              if (domain) domain.enter();
              result = handler(value); // may throw
              if (domain) {
                domain.exit();
                exited = true;
              }
            }
            if (result === reaction.promise) {
              reject(TypeError('Promise-chain cycle'));
            } else if (then = isThenable(result)) {
              then.call(result, resolve, reject);
            } else resolve(result);
          } else reject(value);
        } catch (e) {
          if (domain && !exited) domain.exit();
          reject(e);
        }
      };
      while (chain.length > i) run(chain[i++]); // variable length - can't use forEach
      promise._c = [];
      promise._n = false;
      if (isReject && !promise._h) onUnhandled(promise);
    });
  };
  var onUnhandled = function (promise) {
    task.call(global, function () {
      var value = promise._v;
      var unhandled = isUnhandled(promise);
      var result, handler, console;
      if (unhandled) {
        result = perform(function () {
          if (isNode) {
            process.emit('unhandledRejection', value, promise);
          } else if (handler = global.onunhandledrejection) {
            handler({ promise: promise, reason: value });
          } else if ((console = global.console) && console.error) {
            console.error('Unhandled promise rejection', value);
          }
        });
        // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
        promise._h = isNode || isUnhandled(promise) ? 2 : 1;
      } promise._a = undefined;
      if (unhandled && result.e) throw result.v;
    });
  };
  var isUnhandled = function (promise) {
    return promise._h !== 1 && (promise._a || promise._c).length === 0;
  };
  var onHandleUnhandled = function (promise) {
    task.call(global, function () {
      var handler;
      if (isNode) {
        process.emit('rejectionHandled', promise);
      } else if (handler = global.onrejectionhandled) {
        handler({ promise: promise, reason: promise._v });
      }
    });
  };
  var $reject = function (value) {
    var promise = this;
    if (promise._d) return;
    promise._d = true;
    promise = promise._w || promise; // unwrap
    promise._v = value;
    promise._s = 2;
    if (!promise._a) promise._a = promise._c.slice();
    notify(promise, true);
  };
  var $resolve = function (value) {
    var promise = this;
    var then;
    if (promise._d) return;
    promise._d = true;
    promise = promise._w || promise; // unwrap
    try {
      if (promise === value) throw TypeError("Promise can't be resolved itself");
      if (then = isThenable(value)) {
        microtask(function () {
          var wrapper = { _w: promise, _d: false }; // wrap
          try {
            then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
          } catch (e) {
            $reject.call(wrapper, e);
          }
        });
      } else {
        promise._v = value;
        promise._s = 1;
        notify(promise, false);
      }
    } catch (e) {
      $reject.call({ _w: promise, _d: false }, e); // wrap
    }
  };
  
  // constructor polyfill
  if (!USE_NATIVE) {
    // 25.4.3.1 Promise(executor)
    $Promise = function Promise(executor) {
      anInstance(this, $Promise, PROMISE, '_h');
      aFunction(executor);
      Internal.call(this);
      try {
        executor(ctx($resolve, this, 1), ctx($reject, this, 1));
      } catch (err) {
        $reject.call(this, err);
      }
    };
    // eslint-disable-next-line no-unused-vars
    Internal = function Promise(executor) {
      this._c = [];             // <- awaiting reactions
      this._a = undefined;      // <- checked in isUnhandled reactions
      this._s = 0;              // <- state
      this._d = false;          // <- done
      this._v = undefined;      // <- value
      this._h = 0;              // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
      this._n = false;          // <- notify
    };
    Internal.prototype = __webpack_require__("dcbc")($Promise.prototype, {
      // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
      then: function then(onFulfilled, onRejected) {
        var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
        reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
        reaction.fail = typeof onRejected == 'function' && onRejected;
        reaction.domain = isNode ? process.domain : undefined;
        this._c.push(reaction);
        if (this._a) this._a.push(reaction);
        if (this._s) notify(this, false);
        return reaction.promise;
      },
      // 25.4.5.1 Promise.prototype.catch(onRejected)
      'catch': function (onRejected) {
        return this.then(undefined, onRejected);
      }
    });
    OwnPromiseCapability = function () {
      var promise = new Internal();
      this.promise = promise;
      this.resolve = ctx($resolve, promise, 1);
      this.reject = ctx($reject, promise, 1);
    };
    newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
      return C === $Promise || C === Wrapper
        ? new OwnPromiseCapability(C)
        : newGenericPromiseCapability(C);
    };
  }
  
  $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });
  __webpack_require__("7f20")($Promise, PROMISE);
  __webpack_require__("7a56")(PROMISE);
  Wrapper = __webpack_require__("8378")[PROMISE];
  
  // statics
  $export($export.S + $export.F * !USE_NATIVE, PROMISE, {
    // 25.4.4.5 Promise.reject(r)
    reject: function reject(r) {
      var capability = newPromiseCapability(this);
      var $$reject = capability.reject;
      $$reject(r);
      return capability.promise;
    }
  });
  $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
    // 25.4.4.6 Promise.resolve(x)
    resolve: function resolve(x) {
      return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);
    }
  });
  $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__("5cc5")(function (iter) {
    $Promise.all(iter)['catch'](empty);
  })), PROMISE, {
    // 25.4.4.1 Promise.all(iterable)
    all: function all(iterable) {
      var C = this;
      var capability = newPromiseCapability(C);
      var resolve = capability.resolve;
      var reject = capability.reject;
      var result = perform(function () {
        var values = [];
        var index = 0;
        var remaining = 1;
        forOf(iterable, false, function (promise) {
          var $index = index++;
          var alreadyCalled = false;
          values.push(undefined);
          remaining++;
          C.resolve(promise).then(function (value) {
            if (alreadyCalled) return;
            alreadyCalled = true;
            values[$index] = value;
            --remaining || resolve(values);
          }, reject);
        });
        --remaining || resolve(values);
      });
      if (result.e) reject(result.v);
      return capability.promise;
    },
    // 25.4.4.4 Promise.race(iterable)
    race: function race(iterable) {
      var C = this;
      var capability = newPromiseCapability(C);
      var reject = capability.reject;
      var result = perform(function () {
        forOf(iterable, false, function (promise) {
          C.resolve(promise).then(capability.resolve, reject);
        });
      });
      if (result.e) reject(result.v);
      return capability.promise;
    }
  });
  
  
  /***/ }),
  
  /***/ "5537":
  /***/ (function(module, exports, __webpack_require__) {
  
  var core = __webpack_require__("8378");
  var global = __webpack_require__("7726");
  var SHARED = '__core-js_shared__';
  var store = global[SHARED] || (global[SHARED] = {});
  
  (module.exports = function (key, value) {
    return store[key] || (store[key] = value !== undefined ? value : {});
  })('versions', []).push({
    version: core.version,
    mode: __webpack_require__("2d00") ? 'pure' : 'global',
    copyright: '© 2018 Denis Pushkarev (zloirock.ru)'
  });
  
  
  /***/ }),
  
  /***/ "55dd":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  var $export = __webpack_require__("5ca1");
  var aFunction = __webpack_require__("d8e8");
  var toObject = __webpack_require__("4bf8");
  var fails = __webpack_require__("79e5");
  var $sort = [].sort;
  var test = [1, 2, 3];
  
  $export($export.P + $export.F * (fails(function () {
    // IE8-
    test.sort(undefined);
  }) || !fails(function () {
    // V8 bug
    test.sort(null);
    // Old WebKit
  }) || !__webpack_require__("2f21")($sort)), 'Array', {
    // 22.1.3.25 Array.prototype.sort(comparefn)
    sort: function sort(comparefn) {
      return comparefn === undefined
        ? $sort.call(toObject(this))
        : $sort.call(toObject(this), aFunction(comparefn));
    }
  });
  
  
  /***/ }),
  
  /***/ "5be5":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  
  module.exports = function(options) {
      var getState = options.stateHandler.getState;
  
      /**
       * Tells if the element has been made detectable and ready to be listened for resize events.
       * @public
       * @param {element} The element to check.
       * @returns {boolean} True or false depending on if the element is detectable or not.
       */
      function isDetectable(element) {
          var state = getState(element);
          return state && !!state.isDetectable;
      }
  
      /**
       * Marks the element that it has been made detectable and ready to be listened for resize events.
       * @public
       * @param {element} The element to mark.
       */
      function markAsDetectable(element) {
          getState(element).isDetectable = true;
      }
  
      /**
       * Tells if the element is busy or not.
       * @public
       * @param {element} The element to check.
       * @returns {boolean} True or false depending on if the element is busy or not.
       */
      function isBusy(element) {
          return !!getState(element).busy;
      }
  
      /**
       * Marks the object is busy and should not be made detectable.
       * @public
       * @param {element} element The element to mark.
       * @param {boolean} busy If the element is busy or not.
       */
      function markBusy(element, busy) {
          getState(element).busy = !!busy;
      }
  
      return {
          isDetectable: isDetectable,
          markAsDetectable: markAsDetectable,
          isBusy: isBusy,
          markBusy: markBusy
      };
  };
  
  
  /***/ }),
  
  /***/ "5ca1":
  /***/ (function(module, exports, __webpack_require__) {
  
  var global = __webpack_require__("7726");
  var core = __webpack_require__("8378");
  var hide = __webpack_require__("32e9");
  var redefine = __webpack_require__("2aba");
  var ctx = __webpack_require__("9b43");
  var PROTOTYPE = 'prototype';
  
  var $export = function (type, name, source) {
    var IS_FORCED = type & $export.F;
    var IS_GLOBAL = type & $export.G;
    var IS_STATIC = type & $export.S;
    var IS_PROTO = type & $export.P;
    var IS_BIND = type & $export.B;
    var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
    var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
    var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
    var key, own, out, exp;
    if (IS_GLOBAL) source = name;
    for (key in source) {
      // contains in native
      own = !IS_FORCED && target && target[key] !== undefined;
      // export native or passed
      out = (own ? target : source)[key];
      // bind timers to global for call from export context
      exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
      // extend global
      if (target) redefine(target, key, out, type & $export.U);
      // export
      if (exports[key] != out) hide(exports, key, exp);
      if (IS_PROTO && expProto[key] != out) expProto[key] = out;
    }
  };
  global.core = core;
  // type bitmap
  $export.F = 1;   // forced
  $export.G = 2;   // global
  $export.S = 4;   // static
  $export.P = 8;   // proto
  $export.B = 16;  // bind
  $export.W = 32;  // wrap
  $export.U = 64;  // safe
  $export.R = 128; // real proto method for `library`
  module.exports = $export;
  
  
  /***/ }),
  
  /***/ "5cc5":
  /***/ (function(module, exports, __webpack_require__) {
  
  var ITERATOR = __webpack_require__("2b4c")('iterator');
  var SAFE_CLOSING = false;
  
  try {
    var riter = [7][ITERATOR]();
    riter['return'] = function () { SAFE_CLOSING = true; };
    // eslint-disable-next-line no-throw-literal
    Array.from(riter, function () { throw 2; });
  } catch (e) { /* empty */ }
  
  module.exports = function (exec, skipClosing) {
    if (!skipClosing && !SAFE_CLOSING) return false;
    var safe = false;
    try {
      var arr = [7];
      var iter = arr[ITERATOR]();
      iter.next = function () { return { done: safe = true }; };
      arr[ITERATOR] = function () { return iter; };
      exec(arr);
    } catch (e) { /* empty */ }
    return safe;
  };
  
  
  /***/ }),
  
  /***/ "5dbc":
  /***/ (function(module, exports, __webpack_require__) {
  
  var isObject = __webpack_require__("d3f4");
  var setPrototypeOf = __webpack_require__("8b97").set;
  module.exports = function (that, target, C) {
    var S = target.constructor;
    var P;
    if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
      setPrototypeOf(that, P);
    } return that;
  };
  
  
  /***/ }),
  
  /***/ "5ed4":
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_GridItem_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6e21");
  /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_GridItem_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_GridItem_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  /* unused harmony reexport * */
   /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_GridItem_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 
  
  /***/ }),
  
  /***/ "5eda":
  /***/ (function(module, exports, __webpack_require__) {
  
  // most Object methods by ES6 should accept primitives
  var $export = __webpack_require__("5ca1");
  var core = __webpack_require__("8378");
  var fails = __webpack_require__("79e5");
  module.exports = function (KEY, exec) {
    var fn = (core.Object || {})[KEY] || Object[KEY];
    var exp = {};
    exp[KEY] = exec(fn);
    $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
  };
  
  
  /***/ }),
  
  /***/ "5f1b":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  
  var classof = __webpack_require__("23c6");
  var builtinExec = RegExp.prototype.exec;
  
   // `RegExpExec` abstract operation
  // https://tc39.github.io/ecma262/#sec-regexpexec
  module.exports = function (R, S) {
    var exec = R.exec;
    if (typeof exec === 'function') {
      var result = exec.call(R, S);
      if (typeof result !== 'object') {
        throw new TypeError('RegExp exec method returned something other than an Object or null');
      }
      return result;
    }
    if (classof(R) !== 'RegExp') {
      throw new TypeError('RegExp#exec called on incompatible receiver');
    }
    return builtinExec.call(R, S);
  };
  
  
  /***/ }),
  
  /***/ "613b":
  /***/ (function(module, exports, __webpack_require__) {
  
  var shared = __webpack_require__("5537")('keys');
  var uid = __webpack_require__("ca5a");
  module.exports = function (key) {
    return shared[key] || (shared[key] = uid(key));
  };
  
  
  /***/ }),
  
  /***/ "626a":
  /***/ (function(module, exports, __webpack_require__) {
  
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
  var cof = __webpack_require__("2d95");
  // eslint-disable-next-line no-prototype-builtins
  module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
    return cof(it) == 'String' ? it.split('') : Object(it);
  };
  
  
  /***/ }),
  
  /***/ "6821":
  /***/ (function(module, exports, __webpack_require__) {
  
  // to indexed object, toObject with fallback for non-array-like ES3 strings
  var IObject = __webpack_require__("626a");
  var defined = __webpack_require__("be13");
  module.exports = function (it) {
    return IObject(defined(it));
  };
  
  
  /***/ }),
  
  /***/ "69a8":
  /***/ (function(module, exports) {
  
  var hasOwnProperty = {}.hasOwnProperty;
  module.exports = function (it, key) {
    return hasOwnProperty.call(it, key);
  };
  
  
  /***/ }),
  
  /***/ "6a99":
  /***/ (function(module, exports, __webpack_require__) {
  
  // 7.1.1 ToPrimitive(input [, PreferredType])
  var isObject = __webpack_require__("d3f4");
  // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  // and the second argument - flag - preferred type is a string
  module.exports = function (it, S) {
    if (!isObject(it)) return it;
    var fn, val;
    if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
    if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
    if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
    throw TypeError("Can't convert object to primitive value");
  };
  
  
  /***/ }),
  
  /***/ "6e21":
  /***/ (function(module, exports, __webpack_require__) {
  
  // style-loader: Adds some css to the DOM by adding a <style> tag
  
  // load the styles
  var content = __webpack_require__("9cbe");
  if(typeof content === 'string') content = [[module.i, content, '']];
  if(content.locals) module.exports = content.locals;
  // add the styles to the DOM
  var add = __webpack_require__("499e").default
  var update = add("3cbd0c21", content, true, {"sourceMap":false,"shadowMode":false});
  
  /***/ }),
  
  /***/ "7333":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  // 19.1.2.1 Object.assign(target, source, ...)
  var getKeys = __webpack_require__("0d58");
  var gOPS = __webpack_require__("2621");
  var pIE = __webpack_require__("52a7");
  var toObject = __webpack_require__("4bf8");
  var IObject = __webpack_require__("626a");
  var $assign = Object.assign;
  
  // should work with symbols and should have deterministic property order (V8 bug)
  module.exports = !$assign || __webpack_require__("79e5")(function () {
    var A = {};
    var B = {};
    // eslint-disable-next-line no-undef
    var S = Symbol();
    var K = 'abcdefghijklmnopqrst';
    A[S] = 7;
    K.split('').forEach(function (k) { B[k] = k; });
    return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
  }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
    var T = toObject(target);
    var aLen = arguments.length;
    var index = 1;
    var getSymbols = gOPS.f;
    var isEnum = pIE.f;
    while (aLen > index) {
      var S = IObject(arguments[index++]);
      var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
      var length = keys.length;
      var j = 0;
      var key;
      while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
    } return T;
  } : $assign;
  
  
  /***/ }),
  
  /***/ "7726":
  /***/ (function(module, exports) {
  
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  var global = module.exports = typeof window != 'undefined' && window.Math == Math
    ? window : typeof self != 'undefined' && self.Math == Math ? self
    // eslint-disable-next-line no-new-func
    : Function('return this')();
  if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
  
  
  /***/ }),
  
  /***/ "77f1":
  /***/ (function(module, exports, __webpack_require__) {
  
  var toInteger = __webpack_require__("4588");
  var max = Math.max;
  var min = Math.min;
  module.exports = function (index, length) {
    index = toInteger(index);
    return index < 0 ? max(index + length, 0) : min(index, length);
  };
  
  
  /***/ }),
  
  /***/ "79e5":
  /***/ (function(module, exports) {
  
  module.exports = function (exec) {
    try {
      return !!exec();
    } catch (e) {
      return true;
    }
  };
  
  
  /***/ }),
  
  /***/ "7a56":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  var global = __webpack_require__("7726");
  var dP = __webpack_require__("86cc");
  var DESCRIPTORS = __webpack_require__("9e1e");
  var SPECIES = __webpack_require__("2b4c")('species');
  
  module.exports = function (KEY) {
    var C = global[KEY];
    if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
      configurable: true,
      get: function () { return this; }
    });
  };
  
  
  /***/ }),
  
  /***/ "7f20":
  /***/ (function(module, exports, __webpack_require__) {
  
  var def = __webpack_require__("86cc").f;
  var has = __webpack_require__("69a8");
  var TAG = __webpack_require__("2b4c")('toStringTag');
  
  module.exports = function (it, tag, stat) {
    if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
  };
  
  
  /***/ }),
  
  /***/ "7f7f":
  /***/ (function(module, exports, __webpack_require__) {
  
  var dP = __webpack_require__("86cc").f;
  var FProto = Function.prototype;
  var nameRE = /^\s*function ([^ (]*)/;
  var NAME = 'name';
  
  // 19.2.4.2 name
  NAME in FProto || __webpack_require__("9e1e") && dP(FProto, NAME, {
    configurable: true,
    get: function () {
      try {
        return ('' + this).match(nameRE)[1];
      } catch (e) {
        return '';
      }
    }
  });
  
  
  /***/ }),
  
  /***/ "8079":
  /***/ (function(module, exports, __webpack_require__) {
  
  var global = __webpack_require__("7726");
  var macrotask = __webpack_require__("1991").set;
  var Observer = global.MutationObserver || global.WebKitMutationObserver;
  var process = global.process;
  var Promise = global.Promise;
  var isNode = __webpack_require__("2d95")(process) == 'process';
  
  module.exports = function () {
    var head, last, notify;
  
    var flush = function () {
      var parent, fn;
      if (isNode && (parent = process.domain)) parent.exit();
      while (head) {
        fn = head.fn;
        head = head.next;
        try {
          fn();
        } catch (e) {
          if (head) notify();
          else last = undefined;
          throw e;
        }
      } last = undefined;
      if (parent) parent.enter();
    };
  
    // Node.js
    if (isNode) {
      notify = function () {
        process.nextTick(flush);
      };
    // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339
    } else if (Observer && !(global.navigator && global.navigator.standalone)) {
      var toggle = true;
      var node = document.createTextNode('');
      new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new
      notify = function () {
        node.data = toggle = !toggle;
      };
    // environments with maybe non-completely correct, but existent Promise
    } else if (Promise && Promise.resolve) {
      // Promise.resolve without an argument throws an error in LG WebOS 2
      var promise = Promise.resolve(undefined);
      notify = function () {
        promise.then(flush);
      };
    // for other environments - macrotask based on:
    // - setImmediate
    // - MessageChannel
    // - window.postMessag
    // - onreadystatechange
    // - setTimeout
    } else {
      notify = function () {
        // strange IE + webpack dev server bug - use .call(global)
        macrotask.call(global, flush);
      };
    }
  
    return function (fn) {
      var task = { fn: fn, next: undefined };
      if (last) last.next = task;
      if (!head) {
        head = task;
        notify();
      } last = task;
    };
  };
  
  
  /***/ }),
  
  /***/ "8378":
  /***/ (function(module, exports) {
  
  var core = module.exports = { version: '2.6.0' };
  if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
  
  
  /***/ }),
  
  /***/ "84f2":
  /***/ (function(module, exports) {
  
  module.exports = {};
  
  
  /***/ }),
  
  /***/ "86cc":
  /***/ (function(module, exports, __webpack_require__) {
  
  var anObject = __webpack_require__("cb7c");
  var IE8_DOM_DEFINE = __webpack_require__("c69a");
  var toPrimitive = __webpack_require__("6a99");
  var dP = Object.defineProperty;
  
  exports.f = __webpack_require__("9e1e") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
    anObject(O);
    P = toPrimitive(P, true);
    anObject(Attributes);
    if (IE8_DOM_DEFINE) try {
      return dP(O, P, Attributes);
    } catch (e) { /* empty */ }
    if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
    if ('value' in Attributes) O[P] = Attributes.value;
    return O;
  };
  
  
  /***/ }),
  
  /***/ "8b97":
  /***/ (function(module, exports, __webpack_require__) {
  
  // Works with __proto__ only. Old v8 can't work with null proto objects.
  /* eslint-disable no-proto */
  var isObject = __webpack_require__("d3f4");
  var anObject = __webpack_require__("cb7c");
  var check = function (O, proto) {
    anObject(O);
    if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
  };
  module.exports = {
    set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
      function (test, buggy, set) {
        try {
          set = __webpack_require__("9b43")(Function.call, __webpack_require__("11e9").f(Object.prototype, '__proto__').set, 2);
          set(test, []);
          buggy = !(test instanceof Array);
        } catch (e) { buggy = true; }
        return function setPrototypeOf(O, proto) {
          check(O, proto);
          if (buggy) O.__proto__ = proto;
          else set(O, proto);
          return O;
        };
      }({}, false) : undefined),
    check: check
  };
  
  
  /***/ }),
  
  /***/ "8bbf":
  /***/ (function(module, exports) {
  
  module.exports = require("vue");
  
  /***/ }),
  
  /***/ "9093":
  /***/ (function(module, exports, __webpack_require__) {
  
  // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
  var $keys = __webpack_require__("ce10");
  var hiddenKeys = __webpack_require__("e11e").concat('length', 'prototype');
  
  exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
    return $keys(O, hiddenKeys);
  };
  
  
  /***/ }),
  
  /***/ "9b43":
  /***/ (function(module, exports, __webpack_require__) {
  
  // optional / simple context binding
  var aFunction = __webpack_require__("d8e8");
  module.exports = function (fn, that, length) {
    aFunction(fn);
    if (that === undefined) return fn;
    switch (length) {
      case 1: return function (a) {
        return fn.call(that, a);
      };
      case 2: return function (a, b) {
        return fn.call(that, a, b);
      };
      case 3: return function (a, b, c) {
        return fn.call(that, a, b, c);
      };
    }
    return function (/* ...args */) {
      return fn.apply(that, arguments);
    };
  };
  
  
  /***/ }),
  
  /***/ "9c6c":
  /***/ (function(module, exports, __webpack_require__) {
  
  // 22.1.3.31 Array.prototype[@@unscopables]
  var UNSCOPABLES = __webpack_require__("2b4c")('unscopables');
  var ArrayProto = Array.prototype;
  if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__("32e9")(ArrayProto, UNSCOPABLES, {});
  module.exports = function (key) {
    ArrayProto[UNSCOPABLES][key] = true;
  };
  
  
  /***/ }),
  
  /***/ "9c80":
  /***/ (function(module, exports) {
  
  module.exports = function (exec) {
    try {
      return { e: false, v: exec() };
    } catch (e) {
      return { e: true, v: e };
    }
  };
  
  
  /***/ }),
  
  /***/ "9cbe":
  /***/ (function(module, exports, __webpack_require__) {
  
  exports = module.exports = __webpack_require__("2350")(false);
  // imports
  
  
  // module
  exports.push([module.i, "\n.vue-grid-item{-webkit-transition:all .2s ease;transition:all .2s ease;-webkit-transition-property:left,top,right;transition-property:left,top,right\n}\n.vue-grid-item.no-touch{-ms-touch-action:none;touch-action:none\n}\n.vue-grid-item.cssTransforms{-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform;left:0;right:auto\n}\n.vue-grid-item.cssTransforms.render-rtl{left:auto;right:0\n}\n.vue-grid-item.resizing{opacity:.6;z-index:3\n}\n.vue-grid-item.vue-draggable-dragging{-webkit-transition:none;transition:none;z-index:3\n}\n.vue-grid-item.vue-grid-placeholder{background:red;opacity:.2;-webkit-transition-duration:.1s;transition-duration:.1s;z-index:2;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none\n}\n.vue-grid-item>.vue-resizable-handle{position:absolute;width:20px;height:20px;bottom:0;right:0;background:url(\"data:image/svg+xml;base64,PHN2ZyBzdHlsZT0iYmFja2dyb3VuZC1jb2xvcjojZmZmZmZmMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjYiIGhlaWdodD0iNiI+PHBhdGggZD0iTTYgNkgwVjQuMmg0LjJWMEg2djZ6IiBvcGFjaXR5PSIuMzAyIi8+PC9zdmc+\");background-position:100% 100%;padding:0 3px 3px 0;background-repeat:no-repeat;background-origin:content-box;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:se-resize\n}\n.vue-grid-item>.vue-rtl-resizable-handle{bottom:0;left:0;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTS0xLTFoMTJ2MTJILTF6Ii8+PGc+PHBhdGggc3Ryb2tlLWxpbmVjYXA9InVuZGVmaW5lZCIgc3Ryb2tlLWxpbmVqb2luPSJ1bmRlZmluZWQiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2U9IiMwMDAiIGZpbGw9Im5vbmUiIGQ9Ik0xNDQuODIxLTM4LjM5M2wtMjAuMzU3LTMxLjc4NSIvPjxwYXRoIHN0cm9rZT0iIzY2NiIgc3Ryb2tlLWxpbmVjYXA9InVuZGVmaW5lZCIgc3Ryb2tlLWxpbmVqb2luPSJ1bmRlZmluZWQiIHN0cm9rZS13aWR0aD0iMiIgZmlsbD0ibm9uZSIgZD0iTS45NDctLjAxOHY5LjEyNU0tLjY1NiA5aDEwLjczIi8+PC9nPjwvc3ZnPg==);background-position:0 100%;padding-left:3px;background-repeat:no-repeat;background-origin:content-box;cursor:sw-resize;right:auto\n}\n.vue-grid-item.disable-userselect{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none\n}", ""]);
  
  // exports
  
  
  /***/ }),
  
  /***/ "9def":
  /***/ (function(module, exports, __webpack_require__) {
  
  // 7.1.15 ToLength
  var toInteger = __webpack_require__("4588");
  var min = Math.min;
  module.exports = function (it) {
    return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
  };
  
  
  /***/ }),
  
  /***/ "9e1e":
  /***/ (function(module, exports, __webpack_require__) {
  
  // Thank's IE8 for his funny defineProperty
  module.exports = !__webpack_require__("79e5")(function () {
    return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
  });
  
  
  /***/ }),
  
  /***/ "a25f":
  /***/ (function(module, exports, __webpack_require__) {
  
  var global = __webpack_require__("7726");
  var navigator = global.navigator;
  
  module.exports = navigator && navigator.userAgent || '';
  
  
  /***/ }),
  
  /***/ "a481":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  
  var anObject = __webpack_require__("cb7c");
  var toObject = __webpack_require__("4bf8");
  var toLength = __webpack_require__("9def");
  var toInteger = __webpack_require__("4588");
  var advanceStringIndex = __webpack_require__("0390");
  var regExpExec = __webpack_require__("5f1b");
  var max = Math.max;
  var min = Math.min;
  var floor = Math.floor;
  var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g;
  var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g;
  
  var maybeToString = function (it) {
    return it === undefined ? it : String(it);
  };
  
  // @@replace logic
  __webpack_require__("214f")('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {
    return [
      // `String.prototype.replace` method
      // https://tc39.github.io/ecma262/#sec-string.prototype.replace
      function replace(searchValue, replaceValue) {
        var O = defined(this);
        var fn = searchValue == undefined ? undefined : searchValue[REPLACE];
        return fn !== undefined
          ? fn.call(searchValue, O, replaceValue)
          : $replace.call(String(O), searchValue, replaceValue);
      },
      // `RegExp.prototype[@@replace]` method
      // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
      function (regexp, replaceValue) {
        var res = maybeCallNative($replace, regexp, this, replaceValue);
        if (res.done) return res.value;
  
        var rx = anObject(regexp);
        var S = String(this);
        var functionalReplace = typeof replaceValue === 'function';
        if (!functionalReplace) replaceValue = String(replaceValue);
        var global = rx.global;
        if (global) {
          var fullUnicode = rx.unicode;
          rx.lastIndex = 0;
        }
        var results = [];
        while (true) {
          var result = regExpExec(rx, S);
          if (result === null) break;
          results.push(result);
          if (!global) break;
          var matchStr = String(result[0]);
          if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
        }
        var accumulatedResult = '';
        var nextSourcePosition = 0;
        for (var i = 0; i < results.length; i++) {
          result = results[i];
          var matched = String(result[0]);
          var position = max(min(toInteger(result.index), S.length), 0);
          var captures = [];
          // NOTE: This is equivalent to
          //   captures = result.slice(1).map(maybeToString)
          // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
          // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
          // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
          for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
          var namedCaptures = result.groups;
          if (functionalReplace) {
            var replacerArgs = [matched].concat(captures, position, S);
            if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
            var replacement = String(replaceValue.apply(undefined, replacerArgs));
          } else {
            replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
          }
          if (position >= nextSourcePosition) {
            accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
            nextSourcePosition = position + matched.length;
          }
        }
        return accumulatedResult + S.slice(nextSourcePosition);
      }
    ];
  
      // https://tc39.github.io/ecma262/#sec-getsubstitution
    function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
      var tailPos = position + matched.length;
      var m = captures.length;
      var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
      if (namedCaptures !== undefined) {
        namedCaptures = toObject(namedCaptures);
        symbols = SUBSTITUTION_SYMBOLS;
      }
      return $replace.call(replacement, symbols, function (match, ch) {
        var capture;
        switch (ch.charAt(0)) {
          case '$': return '$';
          case '&': return matched;
          case '`': return str.slice(0, position);
          case "'": return str.slice(tailPos);
          case '<':
            capture = namedCaptures[ch.slice(1, -1)];
            break;
          default: // \d\d?
            var n = +ch;
            if (n === 0) return ch;
            if (n > m) {
              var f = floor(n / 10);
              if (f === 0) return ch;
              if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
              return ch;
            }
            capture = captures[n - 1];
        }
        return capture === undefined ? '' : capture;
      });
    }
  });
  
  
  /***/ }),
  
  /***/ "a5b8":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  // 25.4.1.5 NewPromiseCapability(C)
  var aFunction = __webpack_require__("d8e8");
  
  function PromiseCapability(C) {
    var resolve, reject;
    this.promise = new C(function ($$resolve, $$reject) {
      if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
      resolve = $$resolve;
      reject = $$reject;
    });
    this.resolve = aFunction(resolve);
    this.reject = aFunction(reject);
  }
  
  module.exports.f = function (C) {
    return new PromiseCapability(C);
  };
  
  
  /***/ }),
  
  /***/ "aa77":
  /***/ (function(module, exports, __webpack_require__) {
  
  var $export = __webpack_require__("5ca1");
  var defined = __webpack_require__("be13");
  var fails = __webpack_require__("79e5");
  var spaces = __webpack_require__("fdef");
  var space = '[' + spaces + ']';
  var non = '\u200b\u0085';
  var ltrim = RegExp('^' + space + space + '*');
  var rtrim = RegExp(space + space + '*$');
  
  var exporter = function (KEY, exec, ALIAS) {
    var exp = {};
    var FORCE = fails(function () {
      return !!spaces[KEY]() || non[KEY]() != non;
    });
    var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
    if (ALIAS) exp[ALIAS] = fn;
    $export($export.P + $export.F * FORCE, 'String', exp);
  };
  
  // 1 -> String#trimLeft
  // 2 -> String#trimRight
  // 3 -> String#trim
  var trim = exporter.trim = function (string, TYPE) {
    string = String(defined(string));
    if (TYPE & 1) string = string.replace(ltrim, '');
    if (TYPE & 2) string = string.replace(rtrim, '');
    return string;
  };
  
  module.exports = exporter;
  
  
  /***/ }),
  
  /***/ "abb4":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  
  /* global console: false */
  
  /**
   * Reporter that handles the reporting of logs, warnings and errors.
   * @public
   * @param {boolean} quiet Tells if the reporter should be quiet or not.
   */
  module.exports = function(quiet) {
      function noop() {
          //Does nothing.
      }
  
      var reporter = {
          log: noop,
          warn: noop,
          error: noop
      };
  
      if(!quiet && window.console) {
          var attachFunction = function(reporter, name) {
              //The proxy is needed to be able to call the method with the console context,
              //since we cannot use bind.
              reporter[name] = function reporterProxy() {
                  var f = console[name];
                  if (f.apply) { //IE9 does not support console.log.apply :)
                      f.apply(console, arguments);
                  } else {
                      for (var i = 0; i < arguments.length; i++) {
                          f(arguments[i]);
                      }
                  }
              };
          };
  
          attachFunction(reporter, "log");
          attachFunction(reporter, "warn");
          attachFunction(reporter, "error");
      }
  
      return reporter;
  };
  
  /***/ }),
  
  /***/ "ac6a":
  /***/ (function(module, exports, __webpack_require__) {
  
  var $iterators = __webpack_require__("cadf");
  var getKeys = __webpack_require__("0d58");
  var redefine = __webpack_require__("2aba");
  var global = __webpack_require__("7726");
  var hide = __webpack_require__("32e9");
  var Iterators = __webpack_require__("84f2");
  var wks = __webpack_require__("2b4c");
  var ITERATOR = wks('iterator');
  var TO_STRING_TAG = wks('toStringTag');
  var ArrayValues = Iterators.Array;
  
  var DOMIterables = {
    CSSRuleList: true, // TODO: Not spec compliant, should be false.
    CSSStyleDeclaration: false,
    CSSValueList: false,
    ClientRectList: false,
    DOMRectList: false,
    DOMStringList: false,
    DOMTokenList: true,
    DataTransferItemList: false,
    FileList: false,
    HTMLAllCollection: false,
    HTMLCollection: false,
    HTMLFormElement: false,
    HTMLSelectElement: false,
    MediaList: true, // TODO: Not spec compliant, should be false.
    MimeTypeArray: false,
    NamedNodeMap: false,
    NodeList: true,
    PaintRequestList: false,
    Plugin: false,
    PluginArray: false,
    SVGLengthList: false,
    SVGNumberList: false,
    SVGPathSegList: false,
    SVGPointList: false,
    SVGStringList: false,
    SVGTransformList: false,
    SourceBufferList: false,
    StyleSheetList: true, // TODO: Not spec compliant, should be false.
    TextTrackCueList: false,
    TextTrackList: false,
    TouchList: false
  };
  
  for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
    var NAME = collections[i];
    var explicit = DOMIterables[NAME];
    var Collection = global[NAME];
    var proto = Collection && Collection.prototype;
    var key;
    if (proto) {
      if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
      if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
      Iterators[NAME] = ArrayValues;
      if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
    }
  }
  
  
  /***/ }),
  
  /***/ "ad20":
  /***/ (function(module, exports, __webpack_require__) {
  
  exports = module.exports = __webpack_require__("2350")(false);
  // imports
  
  
  // module
  exports.push([module.i, "\n.vue-grid-layout{position:relative;-webkit-transition:height .2s ease;transition:height .2s ease\n}", ""]);
  
  // exports
  
  
  /***/ }),
  
  /***/ "b0c5":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  var regexpExec = __webpack_require__("520a");
  __webpack_require__("5ca1")({
    target: 'RegExp',
    proto: true,
    forced: regexpExec !== /./.exec
  }, {
    exec: regexpExec
  });
  
  
  /***/ }),
  
  /***/ "b770":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  
  var utils = module.exports = {};
  
  /**
   * Loops through the collection and calls the callback for each element. if the callback returns truthy, the loop is broken and returns the same value.
   * @public
   * @param {*} collection The collection to loop through. Needs to have a length property set and have indices set from 0 to length - 1.
   * @param {function} callback The callback to be called for each element. The element will be given as a parameter to the callback. If this callback returns truthy, the loop is broken and the same value is returned.
   * @returns {*} The value that a callback has returned (if truthy). Otherwise nothing.
   */
  utils.forEach = function(collection, callback) {
      for(var i = 0; i < collection.length; i++) {
          var result = callback(collection[i]);
          if(result) {
              return result;
          }
      }
  };
  
  
  /***/ }),
  
  /***/ "bcaa":
  /***/ (function(module, exports, __webpack_require__) {
  
  var anObject = __webpack_require__("cb7c");
  var isObject = __webpack_require__("d3f4");
  var newPromiseCapability = __webpack_require__("a5b8");
  
  module.exports = function (C, x) {
    anObject(C);
    if (isObject(x) && x.constructor === C) return x;
    var promiseCapability = newPromiseCapability.f(C);
    var resolve = promiseCapability.resolve;
    resolve(x);
    return promiseCapability.promise;
  };
  
  
  /***/ }),
  
  /***/ "be13":
  /***/ (function(module, exports) {
  
  // 7.2.1 RequireObjectCoercible(argument)
  module.exports = function (it) {
    if (it == undefined) throw TypeError("Can't call method on  " + it);
    return it;
  };
  
  
  /***/ }),
  
  /***/ "c274":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  
  var utils = __webpack_require__("50bf");
  
  module.exports = function batchProcessorMaker(options) {
      options             = options || {};
      var reporter        = options.reporter;
      var asyncProcess    = utils.getOption(options, "async", true);
      var autoProcess     = utils.getOption(options, "auto", true);
  
      if(autoProcess && !asyncProcess) {
          reporter && reporter.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true.");
          asyncProcess = true;
      }
  
      var batch = Batch();
      var asyncFrameHandler;
      var isProcessing = false;
  
      function addFunction(level, fn) {
          if(!isProcessing && autoProcess && asyncProcess && batch.size() === 0) {
              // Since this is async, it is guaranteed to be executed after that the fn is added to the batch.
              // This needs to be done before, since we're checking the size of the batch to be 0.
              processBatchAsync();
          }
  
          batch.add(level, fn);
      }
  
      function processBatch() {
          // Save the current batch, and create a new batch so that incoming functions are not added into the currently processing batch.
          // Continue processing until the top-level batch is empty (functions may be added to the new batch while processing, and so on).
          isProcessing = true;
          while (batch.size()) {
              var processingBatch = batch;
              batch = Batch();
              processingBatch.process();
          }
          isProcessing = false;
      }
  
      function forceProcessBatch(localAsyncProcess) {
          if (isProcessing) {
              return;
          }
  
          if(localAsyncProcess === undefined) {
              localAsyncProcess = asyncProcess;
          }
  
          if(asyncFrameHandler) {
              cancelFrame(asyncFrameHandler);
              asyncFrameHandler = null;
          }
  
          if(localAsyncProcess) {
              processBatchAsync();
          } else {
              processBatch();
          }
      }
  
      function processBatchAsync() {
          asyncFrameHandler = requestFrame(processBatch);
      }
  
      function clearBatch() {
          batch           = {};
          batchSize       = 0;
          topLevel        = 0;
          bottomLevel     = 0;
      }
  
      function cancelFrame(listener) {
          // var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout;
          var cancel = clearTimeout;
          return cancel(listener);
      }
  
      function requestFrame(callback) {
          // var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function(fn) { return window.setTimeout(fn, 20); };
          var raf = function(fn) { return setTimeout(fn, 0); };
          return raf(callback);
      }
  
      return {
          add: addFunction,
          force: forceProcessBatch
      };
  };
  
  function Batch() {
      var batch       = {};
      var size        = 0;
      var topLevel    = 0;
      var bottomLevel = 0;
  
      function add(level, fn) {
          if(!fn) {
              fn = level;
              level = 0;
          }
  
          if(level > topLevel) {
              topLevel = level;
          } else if(level < bottomLevel) {
              bottomLevel = level;
          }
  
          if(!batch[level]) {
              batch[level] = [];
          }
  
          batch[level].push(fn);
          size++;
      }
  
      function process() {
          for(var level = bottomLevel; level <= topLevel; level++) {
              var fns = batch[level];
  
              for(var i = 0; i < fns.length; i++) {
                  var fn = fns[i];
                  fn();
              }
          }
      }
  
      function getSize() {
          return size;
      }
  
      return {
          add: add,
          process: process,
          size: getSize
      };
  }
  
  
  /***/ }),
  
  /***/ "c366":
  /***/ (function(module, exports, __webpack_require__) {
  
  // false -> Array#indexOf
  // true  -> Array#includes
  var toIObject = __webpack_require__("6821");
  var toLength = __webpack_require__("9def");
  var toAbsoluteIndex = __webpack_require__("77f1");
  module.exports = function (IS_INCLUDES) {
    return function ($this, el, fromIndex) {
      var O = toIObject($this);
      var length = toLength(O.length);
      var index = toAbsoluteIndex(fromIndex, length);
      var value;
      // Array#includes uses SameValueZero equality algorithm
      // eslint-disable-next-line no-self-compare
      if (IS_INCLUDES && el != el) while (length > index) {
        value = O[index++];
        // eslint-disable-next-line no-self-compare
        if (value != value) return true;
      // Array#indexOf ignores holes, Array#includes - not
      } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
        if (O[index] === el) return IS_INCLUDES || index || 0;
      } return !IS_INCLUDES && -1;
    };
  };
  
  
  /***/ }),
  
  /***/ "c5f6":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  var global = __webpack_require__("7726");
  var has = __webpack_require__("69a8");
  var cof = __webpack_require__("2d95");
  var inheritIfRequired = __webpack_require__("5dbc");
  var toPrimitive = __webpack_require__("6a99");
  var fails = __webpack_require__("79e5");
  var gOPN = __webpack_require__("9093").f;
  var gOPD = __webpack_require__("11e9").f;
  var dP = __webpack_require__("86cc").f;
  var $trim = __webpack_require__("aa77").trim;
  var NUMBER = 'Number';
  var $Number = global[NUMBER];
  var Base = $Number;
  var proto = $Number.prototype;
  // Opera ~12 has broken Object#toString
  var BROKEN_COF = cof(__webpack_require__("2aeb")(proto)) == NUMBER;
  var TRIM = 'trim' in String.prototype;
  
  // 7.1.3 ToNumber(argument)
  var toNumber = function (argument) {
    var it = toPrimitive(argument, false);
    if (typeof it == 'string' && it.length > 2) {
      it = TRIM ? it.trim() : $trim(it, 3);
      var first = it.charCodeAt(0);
      var third, radix, maxCode;
      if (first === 43 || first === 45) {
        third = it.charCodeAt(2);
        if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
      } else if (first === 48) {
        switch (it.charCodeAt(1)) {
          case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
          case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
          default: return +it;
        }
        for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {
          code = digits.charCodeAt(i);
          // parseInt parses a string to a first unavailable symbol
          // but ToNumber should return NaN if a string contains unavailable symbols
          if (code < 48 || code > maxCode) return NaN;
        } return parseInt(digits, radix);
      }
    } return +it;
  };
  
  if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {
    $Number = function Number(value) {
      var it = arguments.length < 1 ? 0 : value;
      var that = this;
      return that instanceof $Number
        // check on 1..constructor(foo) case
        && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)
          ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
    };
    for (var keys = __webpack_require__("9e1e") ? gOPN(Base) : (
      // ES3:
      'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
      // ES6 (in case, if modules with ES6 Number statics required before):
      'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
      'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
    ).split(','), j = 0, key; keys.length > j; j++) {
      if (has(Base, key = keys[j]) && !has($Number, key)) {
        dP($Number, key, gOPD(Base, key));
      }
    }
    $Number.prototype = proto;
    proto.constructor = $Number;
    __webpack_require__("2aba")(global, NUMBER, $Number);
  }
  
  
  /***/ }),
  
  /***/ "c69a":
  /***/ (function(module, exports, __webpack_require__) {
  
  module.exports = !__webpack_require__("9e1e") && !__webpack_require__("79e5")(function () {
    return Object.defineProperty(__webpack_require__("230e")('div'), 'a', { get: function () { return 7; } }).a != 7;
  });
  
  
  /***/ }),
  
  /***/ "c946":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  /**
   * Resize detection strategy that injects divs to elements in order to detect resize events on scroll events.
   * Heavily inspired by: https://github.com/marcj/css-element-queries/blob/master/src/ResizeSensor.js
   */
  
  
  
  var forEach = __webpack_require__("b770").forEach;
  
  module.exports = function(options) {
      options             = options || {};
      var reporter        = options.reporter;
      var batchProcessor  = options.batchProcessor;
      var getState        = options.stateHandler.getState;
      var hasState        = options.stateHandler.hasState;
      var idHandler       = options.idHandler;
  
      if (!batchProcessor) {
          throw new Error("Missing required dependency: batchProcessor");
      }
  
      if (!reporter) {
          throw new Error("Missing required dependency: reporter.");
      }
  
      //TODO: Could this perhaps be done at installation time?
      var scrollbarSizes = getScrollbarSizes();
  
      var styleId = "erd_scroll_detection_scrollbar_style";
      var detectionContainerClass = "erd_scroll_detection_container";
  
      function initDocument(targetDocument) {
          // Inject the scrollbar styling that prevents them from appearing sometimes in Chrome.
          // The injected container needs to have a class, so that it may be styled with CSS (pseudo elements).
          injectScrollStyle(targetDocument, styleId, detectionContainerClass);
      }
  
      initDocument(window.document);
  
      function buildCssTextString(rules) {
          var seperator = options.important ? " !important; " : "; ";
  
          return (rules.join(seperator) + seperator).trim();
      }
  
      function getScrollbarSizes() {
          var width = 500;
          var height = 500;
  
          var child = document.createElement("div");
          child.style.cssText = buildCssTextString(["position: absolute", "width: " + width*2 + "px", "height: " + height*2 + "px", "visibility: hidden", "margin: 0", "padding: 0"]);
  
          var container = document.createElement("div");
          container.style.cssText = buildCssTextString(["position: absolute", "width: " + width + "px", "height: " + height + "px", "overflow: scroll", "visibility: none", "top: " + -width*3 + "px", "left: " + -height*3 + "px", "visibility: hidden", "margin: 0", "padding: 0"]);
  
          container.appendChild(child);
  
          document.body.insertBefore(container, document.body.firstChild);
  
          var widthSize = width - container.clientWidth;
          var heightSize = height - container.clientHeight;
  
          document.body.removeChild(container);
  
          return {
              width: widthSize,
              height: heightSize
          };
      }
  
      function injectScrollStyle(targetDocument, styleId, containerClass) {
          function injectStyle(style, method) {
              method = method || function (element) {
                  targetDocument.head.appendChild(element);
              };
  
              var styleElement = targetDocument.createElement("style");
              styleElement.innerHTML = style;
              styleElement.id = styleId;
              method(styleElement);
              return styleElement;
          }
  
          if (!targetDocument.getElementById(styleId)) {
              var containerAnimationClass = containerClass + "_animation";
              var containerAnimationActiveClass = containerClass + "_animation_active";
              var style = "/* Created by the element-resize-detector library. */\n";
              style += "." + containerClass + " > div::-webkit-scrollbar { " + buildCssTextString(["display: none"]) + " }\n\n";
              style += "." + containerAnimationActiveClass + " { " + buildCssTextString(["-webkit-animation-duration: 0.1s", "animation-duration: 0.1s", "-webkit-animation-name: " + containerAnimationClass, "animation-name: " + containerAnimationClass]) + " }\n";
              style += "@-webkit-keyframes " + containerAnimationClass +  " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n";
              style += "@keyframes " + containerAnimationClass +          " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }";
              injectStyle(style);
          }
      }
  
      function addAnimationClass(element) {
          element.className += " " + detectionContainerClass + "_animation_active";
      }
  
      function addEvent(el, name, cb) {
          if (el.addEventListener) {
              el.addEventListener(name, cb);
          } else if(el.attachEvent) {
              el.attachEvent("on" + name, cb);
          } else {
              return reporter.error("[scroll] Don't know how to add event listeners.");
          }
      }
  
      function removeEvent(el, name, cb) {
          if (el.removeEventListener) {
              el.removeEventListener(name, cb);
          } else if(el.detachEvent) {
              el.detachEvent("on" + name, cb);
          } else {
              return reporter.error("[scroll] Don't know how to remove event listeners.");
          }
      }
  
      function getExpandElement(element) {
          return getState(element).container.childNodes[0].childNodes[0].childNodes[0];
      }
  
      function getShrinkElement(element) {
          return getState(element).container.childNodes[0].childNodes[0].childNodes[1];
      }
  
      /**
       * Adds a resize event listener to the element.
       * @public
       * @param {element} element The element that should have the listener added.
       * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.
       */
      function addListener(element, listener) {
          var listeners = getState(element).listeners;
  
          if (!listeners.push) {
              throw new Error("Cannot add listener to an element that is not detectable.");
          }
  
          getState(element).listeners.push(listener);
      }
  
      /**
       * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.
       * @private
       * @param {object} options Optional options object.
       * @param {element} element The element to make detectable
       * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.
       */
      function makeDetectable(options, element, callback) {
          if (!callback) {
              callback = element;
              element = options;
              options = null;
          }
  
          options = options || {};
  
          function debug() {
              if (options.debug) {
                  var args = Array.prototype.slice.call(arguments);
                  args.unshift(idHandler.get(element), "Scroll: ");
                  if (reporter.log.apply) {
                      reporter.log.apply(null, args);
                  } else {
                      for (var i = 0; i < args.length; i++) {
                          reporter.log(args[i]);
                      }
                  }
              }
          }
  
          function isDetached(element) {
              function isInDocument(element) {
                  return element === element.ownerDocument.body || element.ownerDocument.body.contains(element);
              }
  
              if (!isInDocument(element)) {
                  return true;
              }
  
              // FireFox returns null style in hidden iframes. See https://github.com/wnr/element-resize-detector/issues/68 and https://bugzilla.mozilla.org/show_bug.cgi?id=795520
              if (window.getComputedStyle(element) === null) {
                  return true;
              }
  
              return false;
          }
  
          function isUnrendered(element) {
              // Check the absolute positioned container since the top level container is display: inline.
              var container = getState(element).container.childNodes[0];
              var style = window.getComputedStyle(container);
              return !style.width || style.width.indexOf("px") === -1; //Can only compute pixel value when rendered.
          }
  
          function getStyle() {
              // Some browsers only force layouts when actually reading the style properties of the style object, so make sure that they are all read here,
              // so that the user of the function can be sure that it will perform the layout here, instead of later (important for batching).
              var elementStyle            = window.getComputedStyle(element);
              var style                   = {};
              style.position              = elementStyle.position;
              style.width                 = element.offsetWidth;
              style.height                = element.offsetHeight;
              style.top                   = elementStyle.top;
              style.right                 = elementStyle.right;
              style.bottom                = elementStyle.bottom;
              style.left                  = elementStyle.left;
              style.widthCSS              = elementStyle.width;
              style.heightCSS             = elementStyle.height;
              return style;
          }
  
          function storeStartSize() {
              var style = getStyle();
              getState(element).startSize = {
                  width: style.width,
                  height: style.height
              };
              debug("Element start size", getState(element).startSize);
          }
  
          function initListeners() {
              getState(element).listeners = [];
          }
  
          function storeStyle() {
              debug("storeStyle invoked.");
              if (!getState(element)) {
                  debug("Aborting because element has been uninstalled");
                  return;
              }
  
              var style = getStyle();
              getState(element).style = style;
          }
  
          function storeCurrentSize(element, width, height) {
              getState(element).lastWidth = width;
              getState(element).lastHeight  = height;
          }
  
          function getExpandChildElement(element) {
              return getExpandElement(element).childNodes[0];
          }
  
          function getWidthOffset() {
              return 2 * scrollbarSizes.width + 1;
          }
  
          function getHeightOffset() {
              return 2 * scrollbarSizes.height + 1;
          }
  
          function getExpandWidth(width) {
              return width + 10 + getWidthOffset();
          }
  
          function getExpandHeight(height) {
              return height + 10 + getHeightOffset();
          }
  
          function getShrinkWidth(width) {
              return width * 2 + getWidthOffset();
          }
  
          function getShrinkHeight(height) {
              return height * 2 + getHeightOffset();
          }
  
          function positionScrollbars(element, width, height) {
              var expand          = getExpandElement(element);
              var shrink          = getShrinkElement(element);
              var expandWidth     = getExpandWidth(width);
              var expandHeight    = getExpandHeight(height);
              var shrinkWidth     = getShrinkWidth(width);
              var shrinkHeight    = getShrinkHeight(height);
              expand.scrollLeft   = expandWidth;
              expand.scrollTop    = expandHeight;
              shrink.scrollLeft   = shrinkWidth;
              shrink.scrollTop    = shrinkHeight;
          }
  
          function injectContainerElement() {
              var container = getState(element).container;
  
              if (!container) {
                  container                   = document.createElement("div");
                  container.className         = detectionContainerClass;
                  container.style.cssText     = buildCssTextString(["visibility: hidden", "display: inline", "width: 0px", "height: 0px", "z-index: -1", "overflow: hidden", "margin: 0", "padding: 0"]);
                  getState(element).container = container;
                  addAnimationClass(container);
                  element.appendChild(container);
  
                  var onAnimationStart = function () {
                      getState(element).onRendered && getState(element).onRendered();
                  };
  
                  addEvent(container, "animationstart", onAnimationStart);
  
                  // Store the event handler here so that they may be removed when uninstall is called.
                  // See uninstall function for an explanation why it is needed.
                  getState(element).onAnimationStart = onAnimationStart;
              }
  
              return container;
          }
  
          function injectScrollElements() {
              function alterPositionStyles() {
                  var style = getState(element).style;
  
                  if(style.position === "static") {
                      element.style.setProperty("position", "relative",options.important ? "important" : "");
  
                      var removeRelativeStyles = function(reporter, element, style, property) {
                          function getNumericalValue(value) {
                              return value.replace(/[^-\d\.]/g, "");
                          }
  
                          var value = style[property];
  
                          if(value !== "auto" && getNumericalValue(value) !== "0") {
                              reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element);
                              element.style[property] = 0;
                          }
                      };
  
                      //Check so that there are no accidental styles that will make the element styled differently now that is is relative.
                      //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).
                      removeRelativeStyles(reporter, element, style, "top");
                      removeRelativeStyles(reporter, element, style, "right");
                      removeRelativeStyles(reporter, element, style, "bottom");
                      removeRelativeStyles(reporter, element, style, "left");
                  }
              }
  
              function getLeftTopBottomRightCssText(left, top, bottom, right) {
                  left = (!left ? "0" : (left + "px"));
                  top = (!top ? "0" : (top + "px"));
                  bottom = (!bottom ? "0" : (bottom + "px"));
                  right = (!right ? "0" : (right + "px"));
  
                  return ["left: " + left, "top: " + top, "right: " + right, "bottom: " + bottom];
              }
  
              debug("Injecting elements");
  
              if (!getState(element)) {
                  debug("Aborting because element has been uninstalled");
                  return;
              }
  
              alterPositionStyles();
  
              var rootContainer = getState(element).container;
  
              if (!rootContainer) {
                  rootContainer = injectContainerElement();
              }
  
              // Due to this WebKit bug https://bugs.webkit.org/show_bug.cgi?id=80808 (currently fixed in Blink, but still present in WebKit browsers such as Safari),
              // we need to inject two containers, one that is width/height 100% and another that is left/top -1px so that the final container always is 1x1 pixels bigger than
              // the targeted element.
              // When the bug is resolved, "containerContainer" may be removed.
  
              // The outer container can occasionally be less wide than the targeted when inside inline elements element in WebKit (see https://bugs.webkit.org/show_bug.cgi?id=152980).
              // This should be no problem since the inner container either way makes sure the injected scroll elements are at least 1x1 px.
  
              var scrollbarWidth          = scrollbarSizes.width;
              var scrollbarHeight         = scrollbarSizes.height;
              var containerContainerStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%", "left: 0px", "top: 0px"]);
              var containerStyle          = buildCssTextString(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden"].concat(getLeftTopBottomRightCssText(-(1 + scrollbarWidth), -(1 + scrollbarHeight), -scrollbarHeight, -scrollbarWidth)));
              var expandStyle             = buildCssTextString(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]);
              var shrinkStyle             = buildCssTextString(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]);
              var expandChildStyle        = buildCssTextString(["position: absolute", "left: 0", "top: 0"]);
              var shrinkChildStyle        = buildCssTextString(["position: absolute", "width: 200%", "height: 200%"]);
  
              var containerContainer      = document.createElement("div");
              var container               = document.createElement("div");
              var expand                  = document.createElement("div");
              var expandChild             = document.createElement("div");
              var shrink                  = document.createElement("div");
              var shrinkChild             = document.createElement("div");
  
              // Some browsers choke on the resize system being rtl, so force it to ltr. https://github.com/wnr/element-resize-detector/issues/56
              // However, dir should not be set on the top level container as it alters the dimensions of the target element in some browsers.
              containerContainer.dir              = "ltr";
  
              containerContainer.style.cssText    = containerContainerStyle;
              containerContainer.className        = detectionContainerClass;
              container.className                 = detectionContainerClass;
              container.style.cssText             = containerStyle;
              expand.style.cssText                = expandStyle;
              expandChild.style.cssText           = expandChildStyle;
              shrink.style.cssText                = shrinkStyle;
              shrinkChild.style.cssText           = shrinkChildStyle;
  
              expand.appendChild(expandChild);
              shrink.appendChild(shrinkChild);
              container.appendChild(expand);
              container.appendChild(shrink);
              containerContainer.appendChild(container);
              rootContainer.appendChild(containerContainer);
  
              function onExpandScroll() {
                  getState(element).onExpand && getState(element).onExpand();
              }
  
              function onShrinkScroll() {
                  getState(element).onShrink && getState(element).onShrink();
              }
  
              addEvent(expand, "scroll", onExpandScroll);
              addEvent(shrink, "scroll", onShrinkScroll);
  
              // Store the event handlers here so that they may be removed when uninstall is called.
              // See uninstall function for an explanation why it is needed.
              getState(element).onExpandScroll = onExpandScroll;
              getState(element).onShrinkScroll = onShrinkScroll;
          }
  
          function registerListenersAndPositionElements() {
              function updateChildSizes(element, width, height) {
                  var expandChild             = getExpandChildElement(element);
                  var expandWidth             = getExpandWidth(width);
                  var expandHeight            = getExpandHeight(height);
                  expandChild.style.setProperty("width", expandWidth + "px", options.important ? "important" : "");
                  expandChild.style.setProperty("height", expandHeight + "px", options.important ? "important" : "");
              }
  
              function updateDetectorElements(done) {
                  var width           = element.offsetWidth;
                  var height          = element.offsetHeight;
  
                  // Check whether the size has actually changed since last time the algorithm ran. If not, some steps may be skipped.
                  var sizeChanged = width !== getState(element).lastWidth || height !== getState(element).lastHeight;
  
                  debug("Storing current size", width, height);
  
                  // Store the size of the element sync here, so that multiple scroll events may be ignored in the event listeners.
                  // Otherwise the if-check in handleScroll is useless.
                  storeCurrentSize(element, width, height);
  
                  // Since we delay the processing of the batch, there is a risk that uninstall has been called before the batch gets to execute.
                  // Since there is no way to cancel the fn executions, we need to add an uninstall guard to all fns of the batch.
  
                  batchProcessor.add(0, function performUpdateChildSizes() {
                      if (!sizeChanged) {
                          return;
                      }
  
                      if (!getState(element)) {
                          debug("Aborting because element has been uninstalled");
                          return;
                      }
  
                      if (!areElementsInjected()) {
                          debug("Aborting because element container has not been initialized");
                          return;
                      }
  
                      if (options.debug) {
                          var w = element.offsetWidth;
                          var h = element.offsetHeight;
  
                          if (w !== width || h !== height) {
                              reporter.warn(idHandler.get(element), "Scroll: Size changed before updating detector elements.");
                          }
                      }
  
                      updateChildSizes(element, width, height);
                  });
  
                  batchProcessor.add(1, function updateScrollbars() {
                      // This function needs to be invoked event though the size is unchanged. The element could have been resized very quickly and then
                      // been restored to the original size, which will have changed the scrollbar positions.
  
                      if (!getState(element)) {
                          debug("Aborting because element has been uninstalled");
                          return;
                      }
  
                      if (!areElementsInjected()) {
                          debug("Aborting because element container has not been initialized");
                          return;
                      }
  
                      positionScrollbars(element, width, height);
                  });
  
                  if (sizeChanged && done) {
                      batchProcessor.add(2, function () {
                          if (!getState(element)) {
                              debug("Aborting because element has been uninstalled");
                              return;
                          }
  
                          if (!areElementsInjected()) {
                            debug("Aborting because element container has not been initialized");
                            return;
                          }
  
                          done();
                      });
                  }
              }
  
              function areElementsInjected() {
                  return !!getState(element).container;
              }
  
              function notifyListenersIfNeeded() {
                  function isFirstNotify() {
                      return getState(element).lastNotifiedWidth === undefined;
                  }
  
                  debug("notifyListenersIfNeeded invoked");
  
                  var state = getState(element);
  
                  // Don't notify if the current size is the start size, and this is the first notification.
                  if (isFirstNotify() && state.lastWidth === state.startSize.width && state.lastHeight === state.startSize.height) {
                      return debug("Not notifying: Size is the same as the start size, and there has been no notification yet.");
                  }
  
                  // Don't notify if the size already has been notified.
                  if (state.lastWidth === state.lastNotifiedWidth && state.lastHeight === state.lastNotifiedHeight) {
                      return debug("Not notifying: Size already notified");
                  }
  
  
                  debug("Current size not notified, notifying...");
                  state.lastNotifiedWidth = state.lastWidth;
                  state.lastNotifiedHeight = state.lastHeight;
                  forEach(getState(element).listeners, function (listener) {
                      listener(element);
                  });
              }
  
              function handleRender() {
                  debug("startanimation triggered.");
  
                  if (isUnrendered(element)) {
                      debug("Ignoring since element is still unrendered...");
                      return;
                  }
  
                  debug("Element rendered.");
                  var expand = getExpandElement(element);
                  var shrink = getShrinkElement(element);
                  if (expand.scrollLeft === 0 || expand.scrollTop === 0 || shrink.scrollLeft === 0 || shrink.scrollTop === 0) {
                      debug("Scrollbars out of sync. Updating detector elements...");
                      updateDetectorElements(notifyListenersIfNeeded);
                  }
              }
  
              function handleScroll() {
                  debug("Scroll detected.");
  
                  if (isUnrendered(element)) {
                      // Element is still unrendered. Skip this scroll event.
                      debug("Scroll event fired while unrendered. Ignoring...");
                      return;
                  }
  
                  updateDetectorElements(notifyListenersIfNeeded);
              }
  
              debug("registerListenersAndPositionElements invoked.");
  
              if (!getState(element)) {
                  debug("Aborting because element has been uninstalled");
                  return;
              }
  
              getState(element).onRendered = handleRender;
              getState(element).onExpand = handleScroll;
              getState(element).onShrink = handleScroll;
  
              var style = getState(element).style;
              updateChildSizes(element, style.width, style.height);
          }
  
          function finalizeDomMutation() {
              debug("finalizeDomMutation invoked.");
  
              if (!getState(element)) {
                  debug("Aborting because element has been uninstalled");
                  return;
              }
  
              var style = getState(element).style;
              storeCurrentSize(element, style.width, style.height);
              positionScrollbars(element, style.width, style.height);
          }
  
          function ready() {
              callback(element);
          }
  
          function install() {
              debug("Installing...");
              initListeners();
              storeStartSize();
  
              batchProcessor.add(0, storeStyle);
              batchProcessor.add(1, injectScrollElements);
              batchProcessor.add(2, registerListenersAndPositionElements);
              batchProcessor.add(3, finalizeDomMutation);
              batchProcessor.add(4, ready);
          }
  
          debug("Making detectable...");
  
          if (isDetached(element)) {
              debug("Element is detached");
  
              injectContainerElement();
  
              debug("Waiting until element is attached...");
  
              getState(element).onRendered = function () {
                  debug("Element is now attached");
                  install();
              };
          } else {
              install();
          }
      }
  
      function uninstall(element) {
          var state = getState(element);
  
          if (!state) {
              // Uninstall has been called on a non-erd element.
              return;
          }
  
          // Uninstall may have been called in the following scenarios:
          // (1) Right between the sync code and async batch (here state.busy = true, but nothing have been registered or injected).
          // (2) In the ready callback of the last level of the batch by another element (here, state.busy = true, but all the stuff has been injected).
          // (3) After the installation process (here, state.busy = false and all the stuff has been injected).
          // So to be on the safe side, let's check for each thing before removing.
  
          // We need to remove the event listeners, because otherwise the event might fire on an uninstall element which results in an error when trying to get the state of the element.
          state.onExpandScroll && removeEvent(getExpandElement(element), "scroll", state.onExpandScroll);
          state.onShrinkScroll && removeEvent(getShrinkElement(element), "scroll", state.onShrinkScroll);
          state.onAnimationStart && removeEvent(state.container, "animationstart", state.onAnimationStart);
  
          state.container && element.removeChild(state.container);
      }
  
      return {
          makeDetectable: makeDetectable,
          addListener: addListener,
          uninstall: uninstall,
          initDocument: initDocument
      };
  };
  
  
  /***/ }),
  
  /***/ "ca5a":
  /***/ (function(module, exports) {
  
  var id = 0;
  var px = Math.random();
  module.exports = function (key) {
    return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
  };
  
  
  /***/ }),
  
  /***/ "cadf":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  var addToUnscopables = __webpack_require__("9c6c");
  var step = __webpack_require__("d53b");
  var Iterators = __webpack_require__("84f2");
  var toIObject = __webpack_require__("6821");
  
  // 22.1.3.4 Array.prototype.entries()
  // 22.1.3.13 Array.prototype.keys()
  // 22.1.3.29 Array.prototype.values()
  // 22.1.3.30 Array.prototype[@@iterator]()
  module.exports = __webpack_require__("01f9")(Array, 'Array', function (iterated, kind) {
    this._t = toIObject(iterated); // target
    this._i = 0;                   // next index
    this._k = kind;                // kind
  // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
  }, function () {
    var O = this._t;
    var kind = this._k;
    var index = this._i++;
    if (!O || index >= O.length) {
      this._t = undefined;
      return step(1);
    }
    if (kind == 'keys') return step(0, index);
    if (kind == 'values') return step(0, O[index]);
    return step(0, [index, O[index]]);
  }, 'values');
  
  // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
  Iterators.Arguments = Iterators.Array;
  
  addToUnscopables('keys');
  addToUnscopables('values');
  addToUnscopables('entries');
  
  
  /***/ }),
  
  /***/ "cb7c":
  /***/ (function(module, exports, __webpack_require__) {
  
  var isObject = __webpack_require__("d3f4");
  module.exports = function (it) {
    if (!isObject(it)) throw TypeError(it + ' is not an object!');
    return it;
  };
  
  
  /***/ }),
  
  /***/ "ce10":
  /***/ (function(module, exports, __webpack_require__) {
  
  var has = __webpack_require__("69a8");
  var toIObject = __webpack_require__("6821");
  var arrayIndexOf = __webpack_require__("c366")(false);
  var IE_PROTO = __webpack_require__("613b")('IE_PROTO');
  
  module.exports = function (object, names) {
    var O = toIObject(object);
    var i = 0;
    var result = [];
    var key;
    for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
    // Don't enum bug & hidden keys
    while (names.length > i) if (has(O, key = names[i++])) {
      ~arrayIndexOf(result, key) || result.push(key);
    }
    return result;
  };
  
  
  /***/ }),
  
  /***/ "d3f4":
  /***/ (function(module, exports) {
  
  module.exports = function (it) {
    return typeof it === 'object' ? it !== null : typeof it === 'function';
  };
  
  
  /***/ }),
  
  /***/ "d53b":
  /***/ (function(module, exports) {
  
  module.exports = function (done, value) {
    return { value: value, done: !!done };
  };
  
  
  /***/ }),
  
  /***/ "d6eb":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  
  var prop = "_erd";
  
  function initState(element) {
      element[prop] = {};
      return getState(element);
  }
  
  function getState(element) {
      return element[prop];
  }
  
  function cleanState(element) {
      delete element[prop];
  }
  
  module.exports = {
      initState: initState,
      getState: getState,
      cleanState: cleanState
  };
  
  
  /***/ }),
  
  /***/ "d8e8":
  /***/ (function(module, exports) {
  
  module.exports = function (it) {
    if (typeof it != 'function') throw TypeError(it + ' is not a function!');
    return it;
  };
  
  
  /***/ }),
  
  /***/ "dcbc":
  /***/ (function(module, exports, __webpack_require__) {
  
  var redefine = __webpack_require__("2aba");
  module.exports = function (target, src, safe) {
    for (var key in src) redefine(target, key, src[key], safe);
    return target;
  };
  
  
  /***/ }),
  
  /***/ "e11e":
  /***/ (function(module, exports) {
  
  // IE 8- don't enum bug keys
  module.exports = (
    'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
  ).split(',');
  
  
  /***/ }),
  
  /***/ "e279":
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_GridLayout_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1156");
  /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_GridLayout_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_GridLayout_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  /* unused harmony reexport * */
   /* unused harmony default export */ var _unused_webpack_default_export = (_node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_GridLayout_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 
  
  /***/ }),
  
  /***/ "ebd6":
  /***/ (function(module, exports, __webpack_require__) {
  
  // 7.3.20 SpeciesConstructor(O, defaultConstructor)
  var anObject = __webpack_require__("cb7c");
  var aFunction = __webpack_require__("d8e8");
  var SPECIES = __webpack_require__("2b4c")('species');
  module.exports = function (O, D) {
    var C = anObject(O).constructor;
    var S;
    return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
  };
  
  
  /***/ }),
  
  /***/ "eec4":
  /***/ (function(module, exports, __webpack_require__) {
  
  "use strict";
  
  
  var forEach                 = __webpack_require__("b770").forEach;
  var elementUtilsMaker       = __webpack_require__("5be5");
  var listenerHandlerMaker    = __webpack_require__("49ad");
  var idGeneratorMaker        = __webpack_require__("2cef");
  var idHandlerMaker          = __webpack_require__("5058");
  var reporterMaker           = __webpack_require__("abb4");
  var browserDetector         = __webpack_require__("18e9");
  var batchProcessorMaker     = __webpack_require__("c274");
  var stateHandler            = __webpack_require__("d6eb");
  
  //Detection strategies.
  var objectStrategyMaker     = __webpack_require__("18d2");
  var scrollStrategyMaker     = __webpack_require__("c946");
  
  function isCollection(obj) {
      return Array.isArray(obj) || obj.length !== undefined;
  }
  
  function toArray(collection) {
      if (!Array.isArray(collection)) {
          var array = [];
          forEach(collection, function (obj) {
              array.push(obj);
          });
          return array;
      } else {
          return collection;
      }
  }
  
  function isElement(obj) {
      return obj && obj.nodeType === 1;
  }
  
  /**
   * @typedef idHandler
   * @type {object}
   * @property {function} get Gets the resize detector id of the element.
   * @property {function} set Generate and sets the resize detector id of the element.
   */
  
  /**
   * @typedef Options
   * @type {object}
   * @property {boolean} callOnAdd    Determines if listeners should be called when they are getting added.
                                      Default is true. If true, the listener is guaranteed to be called when it has been added.
                                      If false, the listener will not be guarenteed to be called when it has been added (does not prevent it from being called).
   * @property {idHandler} idHandler  A custom id handler that is responsible for generating, setting and retrieving id's for elements.
                                      If not provided, a default id handler will be used.
   * @property {reporter} reporter    A custom reporter that handles reporting logs, warnings and errors.
                                      If not provided, a default id handler will be used.
                                      If set to false, then nothing will be reported.
   * @property {boolean} debug        If set to true, the the system will report debug messages as default for the listenTo method.
   */
  
  /**
   * Creates an element resize detector instance.
   * @public
   * @param {Options?} options Optional global options object that will decide how this instance will work.
   */
  module.exports = function(options) {
      options = options || {};
  
      //idHandler is currently not an option to the listenTo function, so it should not be added to globalOptions.
      var idHandler;
  
      if (options.idHandler) {
          // To maintain compatability with idHandler.get(element, readonly), make sure to wrap the given idHandler
          // so that readonly flag always is true when it's used here. This may be removed next major version bump.
          idHandler = {
              get: function (element) { return options.idHandler.get(element, true); },
              set: options.idHandler.set
          };
      } else {
          var idGenerator = idGeneratorMaker();
          var defaultIdHandler = idHandlerMaker({
              idGenerator: idGenerator,
              stateHandler: stateHandler
          });
          idHandler = defaultIdHandler;
      }
  
      //reporter is currently not an option to the listenTo function, so it should not be added to globalOptions.
      var reporter = options.reporter;
  
      if(!reporter) {
          //If options.reporter is false, then the reporter should be quiet.
          var quiet = reporter === false;
          reporter = reporterMaker(quiet);
      }
  
      //batchProcessor is currently not an option to the listenTo function, so it should not be added to globalOptions.
      var batchProcessor = getOption(options, "batchProcessor", batchProcessorMaker({ reporter: reporter }));
  
      //Options to be used as default for the listenTo function.
      var globalOptions = {};
      globalOptions.callOnAdd     = !!getOption(options, "callOnAdd", true);
      globalOptions.debug         = !!getOption(options, "debug", false);
  
      var eventListenerHandler    = listenerHandlerMaker(idHandler);
      var elementUtils            = elementUtilsMaker({
          stateHandler: stateHandler
      });
  
      //The detection strategy to be used.
      var detectionStrategy;
      var desiredStrategy = getOption(options, "strategy", "object");
      var importantCssRules = getOption(options, "important", false);
      var strategyOptions = {
          reporter: reporter,
          batchProcessor: batchProcessor,
          stateHandler: stateHandler,
          idHandler: idHandler,
          important: importantCssRules
      };
  
      if(desiredStrategy === "scroll") {
          if (browserDetector.isLegacyOpera()) {
              reporter.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy.");
              desiredStrategy = "object";
          } else if (browserDetector.isIE(9)) {
              reporter.warn("Scroll strategy is not supported on IE9. Changing to object strategy.");
              desiredStrategy = "object";
          }
      }
  
      if(desiredStrategy === "scroll") {
          detectionStrategy = scrollStrategyMaker(strategyOptions);
      } else if(desiredStrategy === "object") {
          detectionStrategy = objectStrategyMaker(strategyOptions);
      } else {
          throw new Error("Invalid strategy name: " + desiredStrategy);
      }
  
      //Calls can be made to listenTo with elements that are still being installed.
      //Also, same elements can occur in the elements list in the listenTo function.
      //With this map, the ready callbacks can be synchronized between the calls
      //so that the ready callback can always be called when an element is ready - even if
      //it wasn't installed from the function itself.
      var onReadyCallbacks = {};
  
      /**
       * Makes the given elements resize-detectable and starts listening to resize events on the elements. Calls the event callback for each event for each element.
       * @public
       * @param {Options?} options Optional options object. These options will override the global options. Some options may not be overriden, such as idHandler.
       * @param {element[]|element} elements The given array of elements to detect resize events of. Single element is also valid.
       * @param {function} listener The callback to be executed for each resize event for each element.
       */
      function listenTo(options, elements, listener) {
          function onResizeCallback(element) {
              var listeners = eventListenerHandler.get(element);
              forEach(listeners, function callListenerProxy(listener) {
                  listener(element);
              });
          }
  
          function addListener(callOnAdd, element, listener) {
              eventListenerHandler.add(element, listener);
  
              if(callOnAdd) {
                  listener(element);
              }
          }
  
          //Options object may be omitted.
          if(!listener) {
              listener = elements;
              elements = options;
              options = {};
          }
  
          if(!elements) {
              throw new Error("At least one element required.");
          }
  
          if(!listener) {
              throw new Error("Listener required.");
          }
  
          if (isElement(elements)) {
              // A single element has been passed in.
              elements = [elements];
          } else if (isCollection(elements)) {
              // Convert collection to array for plugins.
              // TODO: May want to check so that all the elements in the collection are valid elements.
              elements = toArray(elements);
          } else {
              return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
          }
  
          var elementsReady = 0;
  
          var callOnAdd = getOption(options, "callOnAdd", globalOptions.callOnAdd);
          var onReadyCallback = getOption(options, "onReady", function noop() {});
          var debug = getOption(options, "debug", globalOptions.debug);
  
          forEach(elements, function attachListenerToElement(element) {
              if (!stateHandler.getState(element)) {
                  stateHandler.initState(element);
                  idHandler.set(element);
              }
  
              var id = idHandler.get(element);
  
              debug && reporter.log("Attaching listener to element", id, element);
  
              if(!elementUtils.isDetectable(element)) {
                  debug && reporter.log(id, "Not detectable.");
                  if(elementUtils.isBusy(element)) {
                      debug && reporter.log(id, "System busy making it detectable");
  
                      //The element is being prepared to be detectable. Do not make it detectable.
                      //Just add the listener, because the element will soon be detectable.
                      addListener(callOnAdd, element, listener);
                      onReadyCallbacks[id] = onReadyCallbacks[id] || [];
                      onReadyCallbacks[id].push(function onReady() {
                          elementsReady++;
  
                          if(elementsReady === elements.length) {
                              onReadyCallback();
                          }
                      });
                      return;
                  }
  
                  debug && reporter.log(id, "Making detectable...");
                  //The element is not prepared to be detectable, so do prepare it and add a listener to it.
                  elementUtils.markBusy(element, true);
                  return detectionStrategy.makeDetectable({ debug: debug, important: importantCssRules }, element, function onElementDetectable(element) {
                      debug && reporter.log(id, "onElementDetectable");
  
                      if (stateHandler.getState(element)) {
                          elementUtils.markAsDetectable(element);
                          elementUtils.markBusy(element, false);
                          detectionStrategy.addListener(element, onResizeCallback);
                          addListener(callOnAdd, element, listener);
  
                          // Since the element size might have changed since the call to "listenTo", we need to check for this change,
                          // so that a resize event may be emitted.
                          // Having the startSize object is optional (since it does not make sense in some cases such as unrendered elements), so check for its existance before.
                          // Also, check the state existance before since the element may have been uninstalled in the installation process.
                          var state = stateHandler.getState(element);
                          if (state && state.startSize) {
                              var width = element.offsetWidth;
                              var height = element.offsetHeight;
                              if (state.startSize.width !== width || state.startSize.height !== height) {
                                  onResizeCallback(element);
                              }
                          }
  
                          if(onReadyCallbacks[id]) {
                              forEach(onReadyCallbacks[id], function(callback) {
                                  callback();
                              });
                          }
                      } else {
                          // The element has been unisntalled before being detectable.
                          debug && reporter.log(id, "Element uninstalled before being detectable.");
                      }
  
                      delete onReadyCallbacks[id];
  
                      elementsReady++;
                      if(elementsReady === elements.length) {
                          onReadyCallback();
                      }
                  });
              }
  
              debug && reporter.log(id, "Already detecable, adding listener.");
  
              //The element has been prepared to be detectable and is ready to be listened to.
              addListener(callOnAdd, element, listener);
              elementsReady++;
          });
  
          if(elementsReady === elements.length) {
              onReadyCallback();
          }
      }
  
      function uninstall(elements) {
          if(!elements) {
              return reporter.error("At least one element is required.");
          }
  
          if (isElement(elements)) {
              // A single element has been passed in.
              elements = [elements];
          } else if (isCollection(elements)) {
              // Convert collection to array for plugins.
              // TODO: May want to check so that all the elements in the collection are valid elements.
              elements = toArray(elements);
          } else {
              return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
          }
  
          forEach(elements, function (element) {
              eventListenerHandler.removeAllListeners(element);
              detectionStrategy.uninstall(element);
              stateHandler.cleanState(element);
          });
      }
  
      function initDocument(targetDocument) {
          detectionStrategy.initDocument && detectionStrategy.initDocument(targetDocument);
      }
  
      return {
          listenTo: listenTo,
          removeListener: eventListenerHandler.removeListener,
          removeAllListeners: eventListenerHandler.removeAllListeners,
          uninstall: uninstall,
          initDocument: initDocument
      };
  };
  
  function getOption(options, name, defaultValue) {
      var value = options[name];
  
      if((value === undefined || value === null) && defaultValue !== undefined) {
          return defaultValue;
      }
  
      return value;
  }
  
  
  /***/ }),
  
  /***/ "f605":
  /***/ (function(module, exports) {
  
  module.exports = function (it, Constructor, name, forbiddenField) {
    if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
      throw TypeError(name + ': incorrect invocation!');
    } return it;
  };
  
  
  /***/ }),
  
  /***/ "f751":
  /***/ (function(module, exports, __webpack_require__) {
  
  // 19.1.3.1 Object.assign(target, source)
  var $export = __webpack_require__("5ca1");
  
  $export($export.S + $export.F, 'Object', { assign: __webpack_require__("7333") });
  
  
  /***/ }),
  
  /***/ "fab2":
  /***/ (function(module, exports, __webpack_require__) {
  
  var document = __webpack_require__("7726").document;
  module.exports = document && document.documentElement;
  
  
  /***/ }),
  
  /***/ "fb15":
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  __webpack_require__.r(__webpack_exports__);
  
  // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
  // This file is imported into lib/wc client bundles.
  
  if (typeof window !== 'undefined') {
    var setPublicPath_i
    if ((setPublicPath_i = window.document.currentScript) && (setPublicPath_i = setPublicPath_i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))) {
      __webpack_require__.p = setPublicPath_i[1] // eslint-disable-line
    }
  }
  
  // Indicate to webpack that this file can be concatenated
  /* harmony default export */ var setPublicPath = (null);
  
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.function.name.js
  var es6_function_name = __webpack_require__("7f7f");
  
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.iterator.js
  var es6_array_iterator = __webpack_require__("cadf");
  
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.keys.js
  var es6_object_keys = __webpack_require__("456d");
  
  // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom.iterable.js
  var web_dom_iterable = __webpack_require__("ac6a");
  
  // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
  var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
  var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
  
  // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"e182b134-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/GridItem.vue?vue&type=template&id=654289da&
  var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"item",staticClass:"vue-grid-item",class:{ 'vue-resizable' : _vm.resizable, 'resizing' : _vm.isResizing, 'vue-draggable-dragging' : _vm.isDragging, 'cssTransforms' : _vm.useCssTransforms, 'render-rtl' : _vm.renderRtl, 'disable-userselect': _vm.isDragging, 'no-touch': _vm.isAndroid },style:(_vm.style)},[_vm._t("default"),(_vm.resizable)?_c('span',{ref:"handle",class:_vm.resizableHandleClass}):_vm._e()],2)}
  var staticRenderFns = []
  
  
  // CONCATENATED MODULE: ./src/components/GridItem.vue?vue&type=template&id=654289da&
  
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.number.constructor.js
  var es6_number_constructor = __webpack_require__("c5f6");
  
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.regexp.replace.js
  var es6_regexp_replace = __webpack_require__("a481");
  
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.sort.js
  var es6_array_sort = __webpack_require__("55dd");
  
  // CONCATENATED MODULE: ./src/helpers/utils.js
  
  
  
  
  // @flow
  
  /*:: export type LayoutItemRequired = {
    w: number,
    h: number,
    x: number,
    y: number,
    i: string
  };*/
  
  /*:: export type LayoutItem = LayoutItemRequired & {
    minW ? : number,
    minH ? : number,
    maxW ? : number,
    maxH ? : number,
    moved ? : boolean,
    static ? : boolean,
    isDraggable ? : ? boolean,
    isResizable ? : ? boolean
  };*/
  
  // export type Position = {left: number, top: number, width: number, height: number};
  
  /*
  export type DragCallbackData = {
    node: HTMLElement,
    x: number, y: number,
    deltaX: number, deltaY: number,
    lastX: number, lastY: number
  };
  */
  // export type DragEvent = {e: Event} & DragCallbackData;
  
  /*:: export type Layout = Array < LayoutItem > ;*/
  
  // export type ResizeEvent = {e: Event, node: HTMLElement, size: Size};
  // const isProduction = process.env.NODE_ENV === 'production';
  
  /**
   * Return the bottom coordinate of the layout.
   *
   * @param  {Array} layout Layout array.
   * @return {Number}       Bottom coordinate.
   */
  
  /*:: export type Size = {
    width: number,
    height: number
  };*/
  
  function bottom(layout
  /*: Layout*/
  )
  /*: number*/
  {
    var max = 0,
        bottomY;
  
    for (var i = 0, len = layout.length; i < len; i++) {
      bottomY = layout[i].y + layout[i].h;
      if (bottomY > max) max = bottomY;
    }
  
    return max;
  }
  function cloneLayout(layout
  /*: Layout*/
  )
  /*: Layout*/
  {
    var newLayout = Array(layout.length);
  
    for (var i = 0, len = layout.length; i < len; i++) {
      newLayout[i] = cloneLayoutItem(layout[i]);
    }
  
    return newLayout;
  } // Fast path to cloning, since this is monomorphic
  
  function cloneLayoutItem(layoutItem
  /*: LayoutItem*/
  )
  /*: LayoutItem*/
  {
    /*return {
      w: layoutItem.w, h: layoutItem.h, x: layoutItem.x, y: layoutItem.y, i: layoutItem.i,
      minW: layoutItem.minW, maxW: layoutItem.maxW, minH: layoutItem.minH, maxH: layoutItem.maxH,
      moved: Boolean(layoutItem.moved), static: Boolean(layoutItem.static),
      // These can be null
      isDraggable: layoutItem.isDraggable, isResizable: layoutItem.isResizable
    };*/
    return JSON.parse(JSON.stringify(layoutItem));
  }
  /**
   * Given two layoutitems, check if they collide.
   *
   * @return {Boolean}   True if colliding.
   */
  
  function collides(l1
  /*: LayoutItem*/
  , l2
  /*: LayoutItem*/
  )
  /*: boolean*/
  {
    if (l1 === l2) return false; // same element
  
    if (l1.x + l1.w <= l2.x) return false; // l1 is left of l2
  
    if (l1.x >= l2.x + l2.w) return false; // l1 is right of l2
  
    if (l1.y + l1.h <= l2.y) return false; // l1 is above l2
  
    if (l1.y >= l2.y + l2.h) return false; // l1 is below l2
  
    return true; // boxes overlap
  }
  /**
   * Given a layout, compact it. This involves going down each y coordinate and removing gaps
   * between items.
   *
   * @param  {Array} layout Layout.
   * @param  {Boolean} verticalCompact Whether or not to compact the layout
   *   vertically.
   * @return {Array}       Compacted Layout.
   */
  
  function compact(layout
  /*: Layout*/
  , verticalCompact
  /*: Boolean*/
  )
  /*: Layout*/
  {
    // Statics go in the compareWith array right away so items flow around them.
    var compareWith = getStatics(layout); // We go through the items by row and column.
  
    var sorted = sortLayoutItemsByRowCol(layout); // Holding for new items.
  
    var out = Array(layout.length);
  
    for (var i = 0, len = sorted.length; i < len; i++) {
      var l = sorted[i]; // Don't move static elements
  
      if (!l.static) {
        l = compactItem(compareWith, l, verticalCompact); // Add to comparison array. We only collide with items before this one.
        // Statics are already in this array.
  
        compareWith.push(l);
      } // Add to output array to make sure they still come out in the right order.
  
  
      out[layout.indexOf(l)] = l; // Clear moved flag, if it exists.
  
      l.moved = false;
    }
  
    return out;
  }
  /**
   * Compact an item in the layout.
   */
  
  function compactItem(compareWith
  /*: Layout*/
  , l
  /*: LayoutItem*/
  , verticalCompact
  /*: boolean*/
  )
  /*: LayoutItem*/
  {
    if (verticalCompact) {
      // Move the element up as far as it can go without colliding.
      while (l.y > 0 && !getFirstCollision(compareWith, l)) {
        l.y--;
      }
    } // Move it down, and keep moving it down if it's colliding.
  
  
    var collides;
  
    while (collides = getFirstCollision(compareWith, l)) {
      l.y = collides.y + collides.h;
    }
  
    return l;
  }
  /**
   * Given a layout, make sure all elements fit within its bounds.
   *
   * @param  {Array} layout Layout array.
   * @param  {Number} bounds Number of columns.
   */
  
  function correctBounds(layout
  /*: Layout*/
  , bounds
  /*: {
    cols: number
  }*/
  )
  /*: Layout*/
  {
    var collidesWith = getStatics(layout);
  
    for (var i = 0, len = layout.length; i < len; i++) {
      var l = layout[i]; // Overflows right
  
      if (l.x + l.w > bounds.cols) l.x = bounds.cols - l.w; // Overflows left
  
      if (l.x < 0) {
        l.x = 0;
        l.w = bounds.cols;
      }
  
      if (!l.static) collidesWith.push(l);else {
        // If this is static and collides with other statics, we must move it down.
        // We have to do something nicer than just letting them overlap.
        while (getFirstCollision(collidesWith, l)) {
          l.y++;
        }
      }
    }
  
    return layout;
  }
  /**
   * Get a layout item by ID. Used so we can override later on if necessary.
   *
   * @param  {Array}  layout Layout array.
   * @param  {String} id     ID
   * @return {LayoutItem}    Item at ID.
   */
  
  function getLayoutItem(layout
  /*: Layout*/
  , id
  /*: string*/
  )
  /*: ? LayoutItem*/
  {
    for (var i = 0, len = layout.length; i < len; i++) {
      if (layout[i].i === id) return layout[i];
    }
  }
  /**
   * Returns the first item this layout collides with.
   * It doesn't appear to matter which order we approach this from, although
   * perhaps that is the wrong thing to do.
   *
   * @param  {Object} layoutItem Layout item.
   * @return {Object|undefined}  A colliding layout item, or undefined.
   */
  
  function getFirstCollision(layout
  /*: Layout*/
  , layoutItem
  /*: LayoutItem*/
  )
  /*: ? LayoutItem*/
  {
    for (var i = 0, len = layout.length; i < len; i++) {
      if (collides(layout[i], layoutItem)) return layout[i];
    }
  }
  function getAllCollisions(layout
  /*: Layout*/
  , layoutItem
  /*: LayoutItem*/
  )
  /*: Array < LayoutItem >*/
  {
    return layout.filter(function (l) {
      return collides(l, layoutItem);
    });
  }
  /**
   * Get all static elements.
   * @param  {Array} layout Array of layout objects.
   * @return {Array}        Array of static layout items..
   */
  
  function getStatics(layout
  /*: Layout*/
  )
  /*: Array < LayoutItem >*/
  {
    //return [];
    return layout.filter(function (l) {
      return l.static;
    });
  }
  /**
   * Move an element. Responsible for doing cascading movements of other elements.
   *
   * @param  {Array}      layout Full layout to modify.
   * @param  {LayoutItem} l      element to move.
   * @param  {Number}     [x]    X position in grid units.
   * @param  {Number}     [y]    Y position in grid units.
   * @param  {Boolean}    [isUserAction] If true, designates that the item we're moving is
   *                                     being dragged/resized by th euser.
   */
  
  function moveElement(layout
  /*: Layout*/
  , l
  /*: LayoutItem*/
  , x
  /*: Number*/
  , y
  /*: Number*/
  , isUserAction
  /*: Boolean*/
  )
  /*: Layout*/
  {
    if (l.static) return layout; // Short-circuit if nothing to do.
    //if (l.y === y && l.x === x) return layout;
  
    var movingUp = y && l.y > y; // This is quite a bit faster than extending the object
  
    if (typeof x === 'number') l.x = x;
    if (typeof y === 'number') l.y = y;
    l.moved = true; // If this collides with anything, move it.
    // When doing this comparison, we have to sort the items we compare with
    // to ensure, in the case of multiple collisions, that we're getting the
    // nearest collision.
  
    var sorted = sortLayoutItemsByRowCol(layout);
    if (movingUp) sorted = sorted.reverse();
    var collisions = getAllCollisions(sorted, l); // Move each item that collides away from this element.
  
    for (var i = 0, len = collisions.length; i < len; i++) {
      var collision = collisions[i]; // console.log('resolving collision between', l.i, 'at', l.y, 'and', collision.i, 'at', collision.y);
      // Short circuit so we can't infinite loop
  
      if (collision.moved) continue; // This makes it feel a bit more precise by waiting to swap for just a bit when moving up.
  
      if (l.y > collision.y && l.y - collision.y > collision.h / 4) continue; // Don't move static items - we have to move *this* element away
  
      if (collision.static) {
        layout = moveElementAwayFromCollision(layout, collision, l, isUserAction);
      } else {
        layout = moveElementAwayFromCollision(layout, l, collision, isUserAction);
      }
    }
  
    return layout;
  }
  /**
   * This is where the magic needs to happen - given a collision, move an element away from the collision.
   * We attempt to move it up if there's room, otherwise it goes below.
   *
   * @param  {Array} layout            Full layout to modify.
   * @param  {LayoutItem} collidesWith Layout item we're colliding with.
   * @param  {LayoutItem} itemToMove   Layout item we're moving.
   * @param  {Boolean} [isUserAction]  If true, designates that the item we're moving is being dragged/resized
   *                                   by the user.
   */
  
  function moveElementAwayFromCollision(layout
  /*: Layout*/
  , collidesWith
  /*: LayoutItem*/
  , itemToMove
  /*: LayoutItem*/
  , isUserAction
  /*: ? boolean*/
  )
  /*: Layout*/
  {
    // If there is enough space above the collision to put this element, move it there.
    // We only do this on the main collision as this can get funky in cascades and cause
    // unwanted swapping behavior.
    if (isUserAction) {
      // Make a mock item so we don't modify the item here, only modify in moveElement.
      var fakeItem
      /*: LayoutItem*/
      = {
        x: itemToMove.x,
        y: itemToMove.y,
        w: itemToMove.w,
        h: itemToMove.h,
        i: '-1'
      };
      fakeItem.y = Math.max(collidesWith.y - itemToMove.h, 0);
  
      if (!getFirstCollision(layout, fakeItem)) {
        return moveElement(layout, itemToMove, undefined, fakeItem.y);
      }
    } // Previously this was optimized to move below the collision directly, but this can cause problems
    // with cascading moves, as an item may actually leapflog a collision and cause a reversal in order.
  
  
    return moveElement(layout, itemToMove, undefined, itemToMove.y + 1);
  }
  /**
   * Helper to convert a number to a percentage string.
   *
   * @param  {Number} num Any number
   * @return {String}     That number as a percentage.
   */
  
  function perc(num
  /*: number*/
  )
  /*: string*/
  {
    return num * 100 + '%';
  }
  function setTransform(top, left, width, height)
  /*: Object*/
  {
    // Replace unitless items with px
    var translate = "translate3d(" + left + "px," + top + "px, 0)";
    return {
      transform: translate,
      WebkitTransform: translate,
      MozTransform: translate,
      msTransform: translate,
      OTransform: translate,
      width: width + "px",
      height: height + "px",
      position: 'absolute'
    };
  }
  /**
   * Just like the setTransform method, but instead it will return a negative value of right.
   *
   * @param top
   * @param right
   * @param width
   * @param height
   * @returns {{transform: string, WebkitTransform: string, MozTransform: string, msTransform: string, OTransform: string, width: string, height: string, position: string}}
   */
  
  function setTransformRtl(top, right, width, height)
  /*: Object*/
  {
    // Replace unitless items with px
    var translate = "translate3d(" + right * -1 + "px," + top + "px, 0)";
    return {
      transform: translate,
      WebkitTransform: translate,
      MozTransform: translate,
      msTransform: translate,
      OTransform: translate,
      width: width + "px",
      height: height + "px",
      position: 'absolute'
    };
  }
  function setTopLeft(top, left, width, height)
  /*: Object*/
  {
    return {
      top: top + "px",
      left: left + "px",
      width: width + "px",
      height: height + "px",
      position: 'absolute'
    };
  }
  /**
   * Just like the setTopLeft method, but instead, it will return a right property instead of left.
   *
   * @param top
   * @param right
   * @param width
   * @param height
   * @returns {{top: string, right: string, width: string, height: string, position: string}}
   */
  
  function setTopRight(top, right, width, height)
  /*: Object*/
  {
    return {
      top: top + "px",
      right: right + "px",
      width: width + "px",
      height: height + "px",
      position: 'absolute'
    };
  }
  /**
   * Get layout items sorted from top left to right and down.
   *
   * @return {Array} Array of layout objects.
   * @return {Array}        Layout, sorted static items first.
   */
  
  function sortLayoutItemsByRowCol(layout
  /*: Layout*/
  )
  /*: Layout*/
  {
    return [].concat(layout).sort(function (a, b) {
      if (a.y > b.y || a.y === b.y && a.x > b.x) {
        return 1;
      }
  
      return -1;
    });
  }
  /**
   * Generate a layout using the initialLayout and children as a template.
   * Missing entries will be added, extraneous ones will be truncated.
   *
   * @param  {Array}  initialLayout Layout passed in through props.
   * @param  {String} breakpoint    Current responsive breakpoint.
   * @param  {Boolean} verticalCompact Whether or not to compact the layout vertically.
   * @return {Array}                Working layout.
   */
  
  /*
  export function synchronizeLayoutWithChildren(initialLayout: Layout, children: Array<React.Element>|React.Element,
                                                cols: number, verticalCompact: boolean): Layout {
    // ensure 'children' is always an array
    if (!Array.isArray(children)) {
      children = [children];
    }
    initialLayout = initialLayout || [];
  
    // Generate one layout item per child.
    let layout: Layout = [];
    for (let i = 0, len = children.length; i < len; i++) {
      let newItem;
      const child = children[i];
  
      // Don't overwrite if it already exists.
      const exists = getLayoutItem(initialLayout, child.key || "1" /!* FIXME satisfies Flow *!/);
      if (exists) {
        newItem = exists;
      } else {
        const g = child.props._grid;
  
        // Hey, this item has a _grid property, use it.
        if (g) {
          if (!isProduction) {
            validateLayout([g], 'ReactGridLayout.children');
          }
          // Validated; add it to the layout. Bottom 'y' possible is the bottom of the layout.
          // This allows you to do nice stuff like specify {y: Infinity}
          if (verticalCompact) {
            newItem = cloneLayoutItem({...g, y: Math.min(bottom(layout), g.y), i: child.key});
          } else {
            newItem = cloneLayoutItem({...g, y: g.y, i: child.key});
          }
        }
        // Nothing provided: ensure this is added to the bottom
        else {
          newItem = cloneLayoutItem({w: 1, h: 1, x: 0, y: bottom(layout), i: child.key || "1"});
        }
      }
      layout[i] = newItem;
    }
  
    // Correct the layout.
    layout = correctBounds(layout, {cols: cols});
    layout = compact(layout, verticalCompact);
  
    return layout;
  }
  */
  
  /**
   * Validate a layout. Throws errors.
   *
   * @param  {Array}  layout        Array of layout items.
   * @param  {String} [contextName] Context name for errors.
   * @throw  {Error}                Validation error.
   */
  
  function validateLayout(layout
  /*: Layout*/
  , contextName
  /*: string*/
  )
  /*: void*/
  {
    contextName = contextName || "Layout";
    var subProps = ['x', 'y', 'w', 'h'];
    if (!Array.isArray(layout)) throw new Error(contextName + " must be an array!");
  
    for (var i = 0, len = layout.length; i < len; i++) {
      var item = layout[i];
  
      for (var j = 0; j < subProps.length; j++) {
        if (typeof item[subProps[j]] !== 'number') {
          throw new Error('VueGridLayout: ' + contextName + '[' + i + '].' + subProps[j] + ' must be a number!');
        }
      }
  
      if (item.i && typeof item.i !== 'string') {// number is also ok, so comment the error
        // TODO confirm if commenting the line below doesn't cause unexpected problems
        // throw new Error('VueGridLayout: ' + contextName + '[' + i + '].i must be a string!');
      }
  
      if (item.static !== undefined && typeof item.static !== 'boolean') {
        throw new Error('VueGridLayout: ' + contextName + '[' + i + '].static must be a boolean!');
      }
    }
  } // Flow can't really figure this out, so we just use Object
  
  function autoBindHandlers(el
  /*: Object*/
  , fns
  /*: Array < string >*/
  )
  /*: void*/
  {
    fns.forEach(function (key) {
      return el[key] = el[key].bind(el);
    });
  }
  /**
   * Convert a JS object to CSS string. Similar to React's output of CSS.
   * @param obj
   * @returns {string}
   */
  
  function createMarkup(obj) {
    var keys = Object.keys(obj);
    if (!keys.length) return '';
    var i,
        len = keys.length;
    var result = '';
  
    for (i = 0; i < len; i++) {
      var key = keys[i];
      var val = obj[key];
      result += hyphenate(key) + ':' + addPx(key, val) + ';';
    }
  
    return result;
  }
  /* The following list is defined in React's core */
  
  var IS_UNITLESS = {
    animationIterationCount: true,
    boxFlex: true,
    boxFlexGroup: true,
    boxOrdinalGroup: true,
    columnCount: true,
    flex: true,
    flexGrow: true,
    flexPositive: true,
    flexShrink: true,
    flexNegative: true,
    flexOrder: true,
    gridRow: true,
    gridColumn: true,
    fontWeight: true,
    lineClamp: true,
    lineHeight: true,
    opacity: true,
    order: true,
    orphans: true,
    tabSize: true,
    widows: true,
    zIndex: true,
    zoom: true,
    // SVG-related properties
    fillOpacity: true,
    stopOpacity: true,
    strokeDashoffset: true,
    strokeOpacity: true,
    strokeWidth: true
  };
  /**
   * Will add px to the end of style values which are Numbers.
   * @param name
   * @param value
   * @returns {*}
   */
  
  function addPx(name, value) {
    if (typeof value === 'number' && !IS_UNITLESS[name]) {
      return value + 'px';
    } else {
      return value;
    }
  }
  /**
   * Hyphenate a camelCase string.
   *
   * @param {String} str
   * @return {String}
   */
  
  var hyphenateRE = /([a-z\d])([A-Z])/g;
  function hyphenate(str) {
    return str.replace(hyphenateRE, '$1-$2').toLowerCase();
  }
  function findItemInArray(array, property, value) {
    for (var i = 0; i < array.length; i++) {
      if (array[i][property] == value) return true;
    }
  
    return false;
  }
  function findAndRemove(array, property, value) {
    array.forEach(function (result, index) {
      if (result[property] === value) {
        //Remove from array
        array.splice(index, 1);
      }
    });
  }
  // CONCATENATED MODULE: ./src/helpers/draggableUtils.js
  // Get {x, y} positions from event.
  function getControlPosition(e) {
    return offsetXYFromParentOf(e);
  } // Get from offsetParent
  
  function offsetXYFromParentOf(evt) {
    var offsetParent = evt.target.offsetParent || document.body;
    var offsetParentRect = evt.offsetParent === document.body ? {
      left: 0,
      top: 0
    } : offsetParent.getBoundingClientRect();
    var x = evt.clientX + offsetParent.scrollLeft - offsetParentRect.left;
    var y = evt.clientY + offsetParent.scrollTop - offsetParentRect.top;
    /*const x = Math.round(evt.clientX + offsetParent.scrollLeft - offsetParentRect.left);
    const y = Math.round(evt.clientY + offsetParent.scrollTop - offsetParentRect.top);*/
  
    return {
      x: x,
      y: y
    };
  } // Create an data object exposed by <DraggableCore>'s events
  
  function createCoreData(lastX, lastY, x, y) {
    // State changes are often (but not always!) async. We want the latest value.
    var isStart = !isNum(lastX);
  
    if (isStart) {
      // If this is our first move, use the x and y as last coords.
      return {
        deltaX: 0,
        deltaY: 0,
        lastX: x,
        lastY: y,
        x: x,
        y: y
      };
    } else {
      // Otherwise calculate proper values.
      return {
        deltaX: x - lastX,
        deltaY: y - lastY,
        lastX: lastX,
        lastY: lastY,
        x: x,
        y: y
      };
    }
  }
  
  function isNum(num) {
    return typeof num === 'number' && !isNaN(num);
  }
  // CONCATENATED MODULE: ./src/helpers/DOM.js
  var currentDir
  /*: "ltr" | "rtl" | "auto"*/
  = "auto"; // let currentDir = "auto";
  
  function hasDocument() {
    return typeof document !== "undefined";
  }
  
  function hasWindow() {
    return typeof window !== "undefined";
  }
  
  function getDocumentDir() {
    if (!hasDocument()) {
      return currentDir;
    }
  
    var direction = typeof document.dir !== "undefined" ? document.dir : document.getElementsByTagName("html")[0].getAttribute("dir");
    return direction;
  }
  function setDocumentDir(dir
  /*: "ltr" | "rtl" | "auto"*/
  ) {
    // export function setDocumentDir(dir){
    if (!hasDocument) {
      currentDir = dir;
      return;
    }
  
    var html = document.getElementsByTagName("html")[0];
    html.setAttribute("dir", dir);
  }
  function addWindowEventListener(event
  /*:string*/
  , callback
  /*: () => mixed*/
  ) {
    if (!hasWindow) {
      callback();
      return;
    }
  
    window.addEventListener(event, callback);
  }
  function removeWindowEventListener(event
  /*:string*/
  , callback
  /*: () => mixed*/
  ) {
    if (!hasWindow) {
      return;
    }
  
    window.removeEventListener(event, callback);
  }
  // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/GridItem.vue?vue&type=script&lang=js&
  
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  
  
   //    var eventBus = require('./eventBus');
  
  var interact = __webpack_require__("fb3a");
  
  /* harmony default export */ var GridItemvue_type_script_lang_js_ = ({
    name: "GridItem",
    props: {
      /*cols: {
       type: Number,
       required: true
       },*/
  
      /*containerWidth: {
       type: Number,
       required: true
        },
       rowHeight: {
       type: Number,
       required: true
       },
       margin: {
       type: Array,
       required: true
       },
       maxRows: {
       type: Number,
       required: true
       },*/
      isDraggable: {
        type: Boolean,
        required: false,
        default: null
      },
      isResizable: {
        type: Boolean,
        required: false,
        default: null
      },
  
      /*useCssTransforms: {
       type: Boolean,
       required: true
       },
       static: {
       type: Boolean,
       required: false,
       default: false
       },
       */
      minH: {
        type: Number,
        required: false,
        default: 1
      },
      minW: {
        type: Number,
        required: false,
        default: 1
      },
      maxH: {
        type: Number,
        required: false,
        default: Infinity
      },
      maxW: {
        type: Number,
        required: false,
        default: Infinity
      },
      x: {
        type: Number,
        required: true
      },
      y: {
        type: Number,
        required: true
      },
      w: {
        type: Number,
        required: true
      },
      h: {
        type: Number,
        required: true
      },
      i: {
        required: true
      },
      dragIgnoreFrom: {
        type: String,
        required: false,
        default: 'a, button'
      },
      dragAllowFrom: {
        type: String,
        required: false,
        default: null
      },
      resizeIgnoreFrom: {
        type: String,
        required: false,
        default: 'a, button'
      }
    },
    inject: ["eventBus"],
    data: function data() {
      return {
        cols: 1,
        containerWidth: 100,
        rowHeight: 30,
        margin: [10, 10],
        maxRows: Infinity,
        draggable: null,
        resizable: null,
        useCssTransforms: true,
        isDragging: false,
        dragging: null,
        isResizing: false,
        resizing: null,
        lastX: NaN,
        lastY: NaN,
        lastW: NaN,
        lastH: NaN,
        style: {},
        rtl: false,
        dragEventSet: false,
        resizeEventSet: false,
        previousW: null,
        previousH: null,
        previousX: null,
        previousY: null,
        innerX: this.x,
        innerY: this.y,
        innerW: this.w,
        innerH: this.h
      };
    },
    created: function created() {
      var _this = this;
  
      var self = this; // Accessible refernces of functions for removing in beforeDestroy
  
      self.updateWidthHandler = function (width) {
        self.updateWidth(width);
      };
  
      self.compactHandler = function (layout) {
        self.compact(layout);
      };
  
      self.setDraggableHandler = function (isDraggable) {
        if (self.isDraggable === null) {
          self.draggable = isDraggable;
        }
      };
  
      self.setResizableHandler = function (isResizable) {
        if (self.isResizable === null) {
          self.resizable = isResizable;
        }
      };
  
      self.setRowHeightHandler = function (rowHeight) {
        self.rowHeight = rowHeight;
      };
  
      self.directionchangeHandler = function () {
        _this.rtl = getDocumentDir() === 'rtl';
  
        _this.compact();
      };
  
      self.setColNum = function (colNum) {
        self.cols = parseInt(colNum);
      };
  
      this.eventBus.$on('updateWidth', self.updateWidthHandler);
      this.eventBus.$on('compact', self.compactHandler);
      this.eventBus.$on('setDraggable', self.setDraggableHandler);
      this.eventBus.$on('setResizable', self.setResizableHandler);
      this.eventBus.$on('setRowHeight', self.setRowHeightHandler);
      this.eventBus.$on('directionchange', self.directionchangeHandler);
      this.eventBus.$on('setColNum', self.setColNum);
      this.rtl = getDocumentDir() === 'rtl';
    },
    beforeDestroy: function beforeDestroy() {
      var self = this; //Remove listeners
  
      this.eventBus.$off('updateWidth', self.updateWidthHandler);
      this.eventBus.$off('compact', self.compactHandler);
      this.eventBus.$off('setDraggable', self.setDraggableHandler);
      this.eventBus.$off('setResizable', self.setResizableHandler);
      this.eventBus.$off('setRowHeight', self.setRowHeightHandler);
      this.eventBus.$off('directionchange', self.directionchangeHandler);
      this.eventBus.$off('setColNum', self.setColNum);
      this.interactObj.unset(); // destroy interact intance
    },
    mounted: function mounted() {
      this.cols = this.$parent.colNum;
      this.rowHeight = this.$parent.rowHeight;
      this.containerWidth = this.$parent.width !== null ? this.$parent.width : 100;
      this.margin = this.$parent.margin !== undefined ? this.$parent.margin : [10, 10];
      this.maxRows = this.$parent.maxRows;
  
      if (this.isDraggable === null) {
        this.draggable = this.$parent.isDraggable;
      } else {
        this.draggable = this.isDraggable;
      }
  
      if (this.isResizable === null) {
        this.resizable = this.$parent.isResizable;
      } else {
        this.resizable = this.isResizable;
      }
  
      this.useCssTransforms = this.$parent.useCssTransforms;
      this.createStyle();
    },
    watch: {
      isDraggable: function isDraggable() {
        this.draggable = this.isDraggable;
      },
      draggable: function draggable() {
        var self = this;
  
        if (this.interactObj === null || this.interactObj === undefined) {
          this.interactObj = interact(this.$refs.item);
        }
  
        if (this.draggable) {
          var opts = {
            ignoreFrom: this.dragIgnoreFrom,
            allowFrom: this.dragAllowFrom
          };
          this.interactObj.draggable(opts);
          /*this.interactObj.draggable({allowFrom: '.vue-draggable-handle'});*/
  
          if (!this.dragEventSet) {
            this.dragEventSet = true;
            this.interactObj.on('dragstart dragmove dragend', function (event) {
              self.handleDrag(event);
            });
          }
        } else {
          this.interactObj.draggable({
            enabled: false
          });
        }
      },
      isResizable: function isResizable() {
        this.resizable = this.isResizable;
      },
      resizable: function resizable() {
        this.tryMakeResizable();
      },
      rowHeight: function rowHeight() {
        this.createStyle();
      },
      cols: function cols() {
        this.tryMakeResizable();
        this.createStyle();
      },
      containerWidth: function containerWidth() {
        this.tryMakeResizable();
        this.createStyle();
      },
      x: function x(newVal) {
        this.innerX = newVal;
        this.createStyle();
      },
      y: function y(newVal) {
        this.innerY = newVal;
        this.createStyle();
      },
      h: function h(newVal) {
        this.innerH = newVal;
        this.createStyle();
      },
      w: function w(newVal) {
        this.innerW = newVal;
        this.createStyle();
      },
      renderRtl: function renderRtl() {
        // console.log("### renderRtl");
        this.tryMakeResizable();
        this.createStyle();
      }
    },
    computed: {
      isAndroid: function isAndroid() {
        return navigator.userAgent.toLowerCase().indexOf("android") !== -1;
      },
      renderRtl: function renderRtl() {
        return this.$parent.isMirrored ? !this.rtl : this.rtl;
      },
      resizableHandleClass: function resizableHandleClass() {
        if (this.renderRtl) {
          return 'vue-resizable-handle vue-rtl-resizable-handle';
        } else {
          return 'vue-resizable-handle';
        }
      }
    },
    methods: {
      createStyle: function createStyle() {
        if (this.x + this.w > this.cols) {
          this.innerX = 0;
          this.innerW = this.w > this.cols ? this.cols : this.w;
        } else {
          this.innerX = this.x;
          this.innerW = this.w;
        }
  
        var pos = this.calcPosition(this.innerX, this.innerY, this.innerW, this.innerH);
  
        if (this.isDragging) {
          pos.top = this.dragging.top; //                    Add rtl support
  
          if (this.renderRtl) {
            pos.right = this.dragging.left;
          } else {
            pos.left = this.dragging.left;
          }
        }
  
        if (this.isResizing) {
          pos.width = this.resizing.width;
          pos.height = this.resizing.height;
        }
  
        var style; // CSS Transforms support (default)
  
        if (this.useCssTransforms) {
          //                    Add rtl support
          if (this.renderRtl) {
            style = setTransformRtl(pos.top, pos.right, pos.width, pos.height);
          } else {
            style = setTransform(pos.top, pos.left, pos.width, pos.height);
          }
        } else {
          // top,left (slow)
          //                    Add rtl support
          if (this.renderRtl) {
            style = setTopRight(pos.top, pos.right, pos.width, pos.height);
          } else {
            style = setTopLeft(pos.top, pos.left, pos.width, pos.height);
          }
        }
  
        this.style = style;
      },
      handleResize: function handleResize(event) {
        var position = getControlPosition(event); // Get the current drag point from the event. This is used as the offset.
  
        if (position == null) return; // not possible but satisfies flow
  
        var x = position.x,
            y = position.y;
        var newSize = {
          width: 0,
          height: 0
        };
        var pos;
  
        switch (event.type) {
          case "resizestart":
            {
              this.previousW = this.innerW;
              this.previousH = this.innerH;
              pos = this.calcPosition(this.innerX, this.innerY, this.innerW, this.innerH);
              newSize.width = pos.width;
              newSize.height = pos.height;
              this.resizing = newSize;
              this.isResizing = true;
              break;
            }
  
          case "resizemove":
            {
              //                        console.log("### resize => " + event.type + ", lastW=" + this.lastW + ", lastH=" + this.lastH);
              var coreEvent = createCoreData(this.lastW, this.lastH, x, y);
  
              if (this.renderRtl) {
                newSize.width = this.resizing.width - coreEvent.deltaX;
              } else {
                newSize.width = this.resizing.width + coreEvent.deltaX;
              }
  
              newSize.height = this.resizing.height + coreEvent.deltaY; ///console.log("### resize => " + event.type + ", deltaX=" + coreEvent.deltaX + ", deltaY=" + coreEvent.deltaY);
  
              this.resizing = newSize;
              break;
            }
  
          case "resizeend":
            {
              //console.log("### resize end => x=" +this.innerX + " y=" + this.innerY + " w=" + this.innerW + " h=" + this.innerH);
              pos = this.calcPosition(this.innerX, this.innerY, this.innerW, this.innerH);
              newSize.width = pos.width;
              newSize.height = pos.height; //                        console.log("### resize end => " + JSON.stringify(newSize));
  
              this.resizing = null;
              this.isResizing = false;
              break;
            }
        } // Get new WH
  
  
        pos = this.calcWH(newSize.height, newSize.width);
  
        if (pos.w < this.minW) {
          pos.w = this.minW;
        }
  
        if (pos.w > this.maxW) {
          pos.w = this.maxW;
        }
  
        if (pos.h < this.minH) {
          pos.h = this.minH;
        }
  
        if (pos.h > this.maxH) {
          pos.h = this.maxH;
        }
  
        if (pos.h < 1) {
          pos.h = 1;
        }
  
        if (pos.w < 1) {
          pos.w = 1;
        }
  
        this.lastW = x;
        this.lastH = y;
  
        if (this.innerW !== pos.w || this.innerH !== pos.h) {
          this.$emit("resize", this.i, pos.h, pos.w, newSize.height, newSize.width);
        }
  
        if (event.type === "resizeend" && (this.previousW !== this.innerW || this.previousH !== this.innerH)) {
          this.$emit("resized", this.i, pos.h, pos.w, newSize.height, newSize.width);
        }
  
        this.eventBus.$emit("resizeEvent", event.type, this.i, this.innerX, this.innerY, pos.h, pos.w);
      },
      handleDrag: function handleDrag(event) {
        if (this.isResizing) return;
        var position = getControlPosition(event); // Get the current drag point from the event. This is used as the offset.
  
        if (position === null) return; // not possible but satisfies flow
  
        var x = position.x,
            y = position.y; // let shouldUpdate = false;
  
        var newPosition = {
          top: 0,
          left: 0
        };
  
        switch (event.type) {
          case "dragstart":
            {
              this.previousX = this.innerX;
              this.previousY = this.innerY;
              var parentRect = event.target.offsetParent.getBoundingClientRect();
              var clientRect = event.target.getBoundingClientRect();
  
              if (this.renderRtl) {
                newPosition.left = (clientRect.right - parentRect.right) * -1;
              } else {
                newPosition.left = clientRect.left - parentRect.left;
              }
  
              newPosition.top = clientRect.top - parentRect.top;
              this.dragging = newPosition;
              this.isDragging = true;
              break;
            }
  
          case "dragend":
            {
              if (!this.isDragging) return;
  
              var _parentRect = event.target.offsetParent.getBoundingClientRect();
  
              var _clientRect = event.target.getBoundingClientRect(); //                        Add rtl support
  
  
              if (this.renderRtl) {
                newPosition.left = (_clientRect.right - _parentRect.right) * -1;
              } else {
                newPosition.left = _clientRect.left - _parentRect.left;
              }
  
              newPosition.top = _clientRect.top - _parentRect.top; //                        console.log("### drag end => " + JSON.stringify(newPosition));
              //                        console.log("### DROP: " + JSON.stringify(newPosition));
  
              this.dragging = null;
              this.isDragging = false; // shouldUpdate = true;
  
              break;
            }
  
          case "dragmove":
            {
              var coreEvent = createCoreData(this.lastX, this.lastY, x, y); //                        Add rtl support
  
              if (this.renderRtl) {
                newPosition.left = this.dragging.left - coreEvent.deltaX;
              } else {
                newPosition.left = this.dragging.left + coreEvent.deltaX;
              }
  
              newPosition.top = this.dragging.top + coreEvent.deltaY; //                        console.log("### drag => " + event.type + ", x=" + x + ", y=" + y);
              //                        console.log("### drag => " + event.type + ", deltaX=" + coreEvent.deltaX + ", deltaY=" + coreEvent.deltaY);
              //                        console.log("### drag end => " + JSON.stringify(newPosition));
  
              this.dragging = newPosition;
              break;
            }
        } // Get new XY
  
  
        var pos;
  
        if (this.renderRtl) {
          pos = this.calcXY(newPosition.top, newPosition.left);
        } else {
          pos = this.calcXY(newPosition.top, newPosition.left);
        }
  
        this.lastX = x;
        this.lastY = y;
  
        if (this.innerX !== pos.x || this.innerY !== pos.y) {
          this.$emit("move", this.i, pos.x, pos.y);
        }
  
        if (event.type === "dragend" && (this.previousX !== this.innerX || this.previousY !== this.innerY)) {
          this.$emit("moved", this.i, pos.x, pos.y);
        }
  
        this.eventBus.$emit("dragEvent", event.type, this.i, pos.x, pos.y, this.innerH, this.innerW);
      },
      calcPosition: function calcPosition(x, y, w, h) {
        var colWidth = this.calcColWidth(); // add rtl support
  
        var out;
  
        if (this.renderRtl) {
          out = {
            right: Math.round(colWidth * x + (x + 1) * this.margin[0]),
            top: Math.round(this.rowHeight * y + (y + 1) * this.margin[1]),
            // 0 * Infinity === NaN, which causes problems with resize constriants;
            // Fix this if it occurs.
            // Note we do it here rather than later because Math.round(Infinity) causes deopt
            width: w === Infinity ? w : Math.round(colWidth * w + Math.max(0, w - 1) * this.margin[0]),
            height: h === Infinity ? h : Math.round(this.rowHeight * h + Math.max(0, h - 1) * this.margin[1])
          };
        } else {
          out = {
            left: Math.round(colWidth * x + (x + 1) * this.margin[0]),
            top: Math.round(this.rowHeight * y + (y + 1) * this.margin[1]),
            // 0 * Infinity === NaN, which causes problems with resize constriants;
            // Fix this if it occurs.
            // Note we do it here rather than later because Math.round(Infinity) causes deopt
            width: w === Infinity ? w : Math.round(colWidth * w + Math.max(0, w - 1) * this.margin[0]),
            height: h === Infinity ? h : Math.round(this.rowHeight * h + Math.max(0, h - 1) * this.margin[1])
          };
        }
  
        return out;
      },
  
      /**
       * Translate x and y coordinates from pixels to grid units.
       * @param  {Number} top  Top position (relative to parent) in pixels.
       * @param  {Number} left Left position (relative to parent) in pixels.
       * @return {Object} x and y in grid units.
       */
      // TODO check if this function needs change in order to support rtl.
      calcXY: function calcXY(top, left) {
        var colWidth = this.calcColWidth(); // left = colWidth * x + margin * (x + 1)
        // l = cx + m(x+1)
        // l = cx + mx + m
        // l - m = cx + mx
        // l - m = x(c + m)
        // (l - m) / (c + m) = x
        // x = (left - margin) / (coldWidth + margin)
  
        var x = Math.round((left - this.margin[0]) / (colWidth + this.margin[0]));
        var y = Math.round((top - this.margin[1]) / (this.rowHeight + this.margin[1])); // Capping
  
        x = Math.max(Math.min(x, this.cols - this.innerW), 0);
        y = Math.max(Math.min(y, this.maxRows - this.innerH), 0);
        return {
          x: x,
          y: y
        };
      },
      // Helper for generating column width
      calcColWidth: function calcColWidth() {
        var colWidth = (this.containerWidth - this.margin[0] * (this.cols + 1)) / this.cols; // console.log("### COLS=" + this.cols + " COL WIDTH=" + colWidth + " MARGIN " + this.margin[0]);
  
        return colWidth;
      },
  
      /**
       * Given a height and width in pixel values, calculate grid units.
       * @param  {Number} height Height in pixels.
       * @param  {Number} width  Width in pixels.
       * @return {Object} w, h as grid units.
       */
      calcWH: function calcWH(height, width) {
        var colWidth = this.calcColWidth(); // width = colWidth * w - (margin * (w - 1))
        // ...
        // w = (width + margin) / (colWidth + margin)
  
        var w = Math.round((width + this.margin[0]) / (colWidth + this.margin[0]));
        var h = Math.round((height + this.margin[1]) / (this.rowHeight + this.margin[1])); // Capping
  
        w = Math.max(Math.min(w, this.cols - this.innerX), 0);
        h = Math.max(Math.min(h, this.maxRows - this.innerY), 0);
        return {
          w: w,
          h: h
        };
      },
      updateWidth: function updateWidth(width, colNum) {
        this.containerWidth = width;
  
        if (colNum !== undefined && colNum !== null) {
          this.cols = colNum;
        }
      },
      compact: function compact() {
        this.createStyle();
      },
      tryMakeResizable: function tryMakeResizable() {
        var self = this;
  
        if (this.interactObj === null || this.interactObj === undefined) {
          this.interactObj = interact(this.$refs.item);
        }
  
        if (this.resizable) {
          var maximum = this.calcPosition(0, 0, this.maxW, this.maxH);
          var minimum = this.calcPosition(0, 0, this.minW, this.minH); // console.log("### MAX " + JSON.stringify(maximum));
          // console.log("### MIN " + JSON.stringify(minimum));
  
          var opts = {
            preserveAspectRatio: true,
            // allowFrom: "." + this.resizableHandleClass,
            edges: {
              left: false,
              right: "." + this.resizableHandleClass,
              bottom: "." + this.resizableHandleClass,
              top: false
            },
            ignoreFrom: this.resizeIgnoreFrom,
            restrictSize: {
              min: {
                height: minimum.height,
                width: minimum.width
              },
              max: {
                height: maximum.height,
                width: maximum.width
              }
            }
          };
          this.interactObj.resizable(opts);
  
          if (!this.resizeEventSet) {
            this.resizeEventSet = true;
            this.interactObj.on('resizestart resizemove resizeend', function (event) {
              self.handleResize(event);
            });
          }
        } else {
          this.interactObj.resizable({
            enabled: false
          });
        }
      },
      autoSize: function autoSize() {
        // ok here we want to calculate if a resize is needed
        this.previousW = this.innerW;
        this.previousH = this.innerH;
        var newSize = this.$slots.default[0].elm.getBoundingClientRect();
        var pos = this.calcWH(newSize.height, newSize.width);
  
        if (pos.w < this.minW) {
          pos.w = this.minW;
        }
  
        if (pos.w > this.maxW) {
          pos.w = this.maxW;
        }
  
        if (pos.h < this.minH) {
          pos.h = this.minH;
        }
  
        if (pos.h > this.maxH) {
          pos.h = this.maxH;
        }
  
        if (pos.h < 1) {
          pos.h = 1;
        }
  
        if (pos.w < 1) {
          pos.w = 1;
        } // this.lastW = x; // basicly, this is copied from resizehandler, but shouldn't be needed
        // this.lastH = y;
  
  
        if (this.innerW !== pos.w || this.innerH !== pos.h) {
          this.$emit("resize", this.i, pos.h, pos.w, newSize.height, newSize.width);
        }
  
        if (this.previousW !== pos.w || this.previousH !== pos.h) {
          this.$emit("resized", this.i, pos.h, pos.w, newSize.height, newSize.width);
          this.eventBus.$emit("resizeEvent", "resizeend", this.i, this.innerX, this.innerY, pos.h, pos.w);
        }
      }
    }
  });
  // CONCATENATED MODULE: ./src/components/GridItem.vue?vue&type=script&lang=js&
   /* harmony default export */ var components_GridItemvue_type_script_lang_js_ = (GridItemvue_type_script_lang_js_); 
  // EXTERNAL MODULE: ./src/components/GridItem.vue?vue&type=style&index=0&lang=css&
  var GridItemvue_type_style_index_0_lang_css_ = __webpack_require__("5ed4");
  
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  /* globals __VUE_SSR_CONTEXT__ */
  
  // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  // This module is a runtime utility for cleaner component module output and will
  // be included in the final webpack user bundle.
  
  function normalizeComponent (
    scriptExports,
    render,
    staticRenderFns,
    functionalTemplate,
    injectStyles,
    scopeId,
    moduleIdentifier, /* server only */
    shadowMode /* vue-cli only */
  ) {
    // Vue.extend constructor export interop
    var options = typeof scriptExports === 'function'
      ? scriptExports.options
      : scriptExports
  
    // render functions
    if (render) {
      options.render = render
      options.staticRenderFns = staticRenderFns
      options._compiled = true
    }
  
    // functional template
    if (functionalTemplate) {
      options.functional = true
    }
  
    // scopedId
    if (scopeId) {
      options._scopeId = 'data-v-' + scopeId
    }
  
    var hook
    if (moduleIdentifier) { // server build
      hook = function (context) {
        // 2.3 injection
        context =
          context || // cached call
          (this.$vnode && this.$vnode.ssrContext) || // stateful
          (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
        // 2.2 with runInNewContext: true
        if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
          context = __VUE_SSR_CONTEXT__
        }
        // inject component styles
        if (injectStyles) {
          injectStyles.call(this, context)
        }
        // register component module identifier for async chunk inferrence
        if (context && context._registeredComponents) {
          context._registeredComponents.add(moduleIdentifier)
        }
      }
      // used by ssr in case component is cached and beforeCreate
      // never gets called
      options._ssrRegister = hook
    } else if (injectStyles) {
      hook = shadowMode
        ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
        : injectStyles
    }
  
    if (hook) {
      if (options.functional) {
        // for template-only hot-reload because in that case the render fn doesn't
        // go through the normalizer
        options._injectStyles = hook
        // register for functioal component in vue file
        var originalRender = options.render
        options.render = function renderWithStyleInjection (h, context) {
          hook.call(context)
          return originalRender(h, context)
        }
      } else {
        // inject component registration as beforeCreate hook
        var existing = options.beforeCreate
        options.beforeCreate = existing
          ? [].concat(existing, hook)
          : [hook]
      }
    }
  
    return {
      exports: scriptExports,
      options: options
    }
  }
  
  // CONCATENATED MODULE: ./src/components/GridItem.vue
  
  
  
  
  
  
  /* normalize component */
  
  var component = normalizeComponent(
    components_GridItemvue_type_script_lang_js_,
    render,
    staticRenderFns,
    false,
    null,
    null,
    null
    
  )
  
  component.options.__file = "GridItem.vue"
  /* harmony default export */ var GridItem = (component.exports);
  // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"e182b134-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/GridLayout.vue?vue&type=template&id=25739c34&
  var GridLayoutvue_type_template_id_25739c34_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"item",staticClass:"vue-grid-layout",style:(_vm.mergedStyle)},[_vm._t("default"),_c('grid-item',{directives:[{name:"show",rawName:"v-show",value:(_vm.isDragging),expression:"isDragging"}],staticClass:"vue-grid-placeholder",attrs:{"x":_vm.placeholder.x,"y":_vm.placeholder.y,"w":_vm.placeholder.w,"h":_vm.placeholder.h,"i":_vm.placeholder.i}})],2)}
  var GridLayoutvue_type_template_id_25739c34_staticRenderFns = []
  
  
  // CONCATENATED MODULE: ./src/components/GridLayout.vue?vue&type=template&id=25739c34&
  
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.assign.js
  var es6_object_assign = __webpack_require__("f751");
  
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.promise.js
  var es6_promise = __webpack_require__("551c");
  
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es7.promise.finally.js
  var es7_promise_finally = __webpack_require__("097d");
  
  // CONCATENATED MODULE: ./src/helpers/responsiveUtils.js
  
  
  
  // @flow
  
  
  /*:: import type {Layout} from './utils';*/
  
  /*:: export type ResponsiveLayout = {lg?: Layout, md?: Layout, sm?: Layout, xs?: Layout, xxs?: Layout};*/
  
  /*:: type Breakpoint = string;*/
  
  /**
   * Given a width, find the highest breakpoint that matches is valid for it (width > breakpoint).
   *
   * @param  {Object} breakpoints Breakpoints object (e.g. {lg: 1200, md: 960, ...})
   * @param  {Number} width Screen width.
   * @return {String}       Highest breakpoint that is less than width.
   */
  
  /*:: type Breakpoints = {lg?: number, md?: number, sm?: number, xs?: number, xxs?: number};*/
  
  function getBreakpointFromWidth(breakpoints
  /*: Breakpoints*/
  , width
  /*: number*/
  )
  /*: Breakpoint*/
  {
    var sorted = sortBreakpoints(breakpoints);
    var matching = sorted[0];
  
    for (var i = 1, len = sorted.length; i < len; i++) {
      var breakpointName = sorted[i];
      if (width > breakpoints[breakpointName]) matching = breakpointName;
    }
  
    return matching;
  }
  /**
   * Given a breakpoint, get the # of cols set for it.
   * @param  {String} breakpoint Breakpoint name.
   * @param  {Object} cols       Map of breakpoints to cols.
   * @return {Number}            Number of cols.
   */
  
  function getColsFromBreakpoint(breakpoint
  /*: Breakpoint*/
  , cols
  /*: Breakpoints*/
  )
  /*: number*/
  {
    if (!cols[breakpoint]) {
      throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint " + breakpoint + " is missing!");
    }
  
    return cols[breakpoint];
  }
  /**
   * Given existing layouts and a new breakpoint, find or generate a new layout.
   *
   * This finds the layout above the new one and generates from it, if it exists.
   *
   * @param  {Array} orgLayout     Original layout.
   * @param  {Object} layouts     Existing layouts.
   * @param  {Array} breakpoints All breakpoints.
   * @param  {String} breakpoint New breakpoint.
   * @param  {String} breakpoint Last breakpoint (for fallback).
   * @param  {Number} cols       Column count at new breakpoint.
   * @param  {Boolean} verticalCompact Whether or not to compact the layout
   *   vertically.
   * @return {Array}             New layout.
   */
  
  function findOrGenerateResponsiveLayout(orgLayout
  /*: Layout*/
  , layouts
  /*: ResponsiveLayout*/
  , breakpoints
  /*: Breakpoints*/
  , breakpoint
  /*: Breakpoint*/
  , lastBreakpoint
  /*: Breakpoint*/
  , cols
  /*: number*/
  , verticalCompact
  /*: boolean*/
  )
  /*: Layout*/
  {
    // If it already exists, just return it.
    if (layouts[breakpoint]) return cloneLayout(layouts[breakpoint]); // Find or generate the next layout
  
    var layout = orgLayout;
    var breakpointsSorted = sortBreakpoints(breakpoints);
    var breakpointsAbove = breakpointsSorted.slice(breakpointsSorted.indexOf(breakpoint));
  
    for (var i = 0, len = breakpointsAbove.length; i < len; i++) {
      var b = breakpointsAbove[i];
  
      if (layouts[b]) {
        layout = layouts[b];
        break;
      }
    }
  
    layout = cloneLayout(layout || []); // clone layout so we don't modify existing items
  
    return compact(correctBounds(layout, {
      cols: cols
    }), verticalCompact);
  }
  function generateResponsiveLayout(layout
  /*: Layout*/
  , breakpoints
  /*: Breakpoints*/
  , breakpoint
  /*: Breakpoint*/
  , lastBreakpoint
  /*: Breakpoint*/
  , cols
  /*: number*/
  , verticalCompact
  /*: boolean*/
  )
  /*: Layout*/
  {
    // If it already exists, just return it.
  
    /*if (layouts[breakpoint]) return cloneLayout(layouts[breakpoint]);
    // Find or generate the next layout
    let layout = layouts[lastBreakpoint];*/
  
    /*const breakpointsSorted = sortBreakpoints(breakpoints);
    const breakpointsAbove = breakpointsSorted.slice(breakpointsSorted.indexOf(breakpoint));
    for (let i = 0, len = breakpointsAbove.length; i < len; i++) {
    const b = breakpointsAbove[i];
    if (layouts[b]) {
      layout = layouts[b];
      break;
    }
    }*/
    layout = cloneLayout(layout || []); // clone layout so we don't modify existing items
  
    return compact(correctBounds(layout, {
      cols: cols
    }), verticalCompact);
  }
  /**
   * Given breakpoints, return an array of breakpoints sorted by width. This is usually
   * e.g. ['xxs', 'xs', 'sm', ...]
   *
   * @param  {Object} breakpoints Key/value pair of breakpoint names to widths.
   * @return {Array}              Sorted breakpoints.
   */
  
  function sortBreakpoints(breakpoints
  /*: Breakpoints*/
  )
  /*: Array<Breakpoint>*/
  {
    var keys
    /*: Array<string>*/
    = Object.keys(breakpoints);
    return keys.sort(function (a, b) {
      return breakpoints[a] - breakpoints[b];
    });
  }
  // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/GridLayout.vue?vue&type=script&lang=js&
  
  
  
  
  
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  
  
  var elementResizeDetectorMaker = __webpack_require__("eec4");
  
  
   //var eventBus = require('./eventBus');
  
  
  
  /* harmony default export */ var GridLayoutvue_type_script_lang_js_ = ({
    name: "GridLayout",
    provide: function provide() {
      return {
        eventBus: null
      };
    },
    components: {
      GridItem: GridItem
    },
    props: {
      // If true, the container height swells and contracts to fit contents
      autoSize: {
        type: Boolean,
        default: true
      },
      colNum: {
        type: Number,
        default: 12
      },
      rowHeight: {
        type: Number,
        default: 150
      },
      maxRows: {
        type: Number,
        default: Infinity
      },
      isRowHeightFlex: {
        type: Boolean,
        default: false
      },
      margin: {
        type: Array,
        default: function _default() {
          return [10, 10];
        }
      },
      isDraggable: {
        type: Boolean,
        default: true
      },
      isResizable: {
        type: Boolean,
        default: true
      },
      isMirrored: {
        type: Boolean,
        default: false
      },
      useCssTransforms: {
        type: Boolean,
        default: true
      },
      verticalCompact: {
        type: Boolean,
        default: true
      },
      layout: {
        type: Array,
        required: true
      },
      responsive: {
        type: Boolean,
        default: false
      },
      responsiveLayouts: {
        type: Object,
        default: function _default() {
          return {};
        }
      },
      breakpoints: {
        type: Object,
        default: function _default() {
          return {
            lg: 1200,
            md: 996,
            sm: 768,
            xs: 480,
            xxs: 0
          };
        }
      },
      cols: {
        type: Object,
        default: function _default() {
          return {
            lg: 12,
            md: 10,
            sm: 6,
            xs: 4,
            xxs: 2
          };
        }
      }
    },
    data: function data() {
      return {
        width: null,
        mergedStyle: {},
        lastLayoutLength: 0,
        isDragging: false,
        height: null,
        flexRowCount: 0,
        placeholder: {
          x: 0,
          y: 0,
          w: 0,
          h: 0,
          i: -1
        },
        layouts: {},
        // array to store all layouts from different breakpoints
        lastBreakpoint: null,
        // store last active breakpoint
        originalLayout: null // store original Layout
  
      };
    },
    created: function created() {
      var self = this; // Accessible refernces of functions for removing in beforeDestroy
  
      self.resizeEventHandler = function (eventType, i, x, y, h, w) {
        self.resizeEvent(eventType, i, x, y, h, w);
      };
  
      self.dragEventHandler = function (eventType, i, x, y, h, w) {
        self.dragEvent(eventType, i, x, y, h, w);
      };
  
      self._provided.eventBus = new external_commonjs_vue_commonjs2_vue_root_Vue_default.a();
      self.eventBus = self._provided.eventBus;
      self.eventBus.$on("resizeEvent", self.resizeEventHandler);
      self.eventBus.$on("dragEvent", self.dragEventHandler);
    },
    beforeDestroy: function beforeDestroy() {
      //Remove listeners
      this.eventBus.$off("resizeEvent", this.resizeEventHandler);
      this.eventBus.$off("dragEvent", this.dragEventHandler);
      removeWindowEventListener("resize", this.onWindowResize);
    },
    mounted: function mounted() {
      this.$nextTick(function () {
        validateLayout(this.layout);
        this.originalLayout = this.layout;
        var self = this;
        this.$nextTick(function () {
          if (self.width === null) {
            self.onWindowResize();
            self.initResponsiveFeatures(); //self.width = self.$el.offsetWidth;
  
            addWindowEventListener("resize", self.onWindowResize);
          }
  
          compact(self.layout, self.verticalCompact);
          self.updateHeight();
          self.$nextTick(function () {
            var erd = elementResizeDetectorMaker({
              strategy: "scroll" //<- For ultra performance.
  
            });
            erd.listenTo(self.$refs.item, function () {
              self.onWindowResize();
            });
          });
        });
        addWindowEventListener("load", self.onWindowLoad.bind(this));
      });
    },
    watch: {
      width: function width() {
        this.$nextTick(function () {
          //this.$broadcast("updateWidth", this.width);
          this.eventBus.$emit("updateWidth", this.width);
          this.updateHeight();
        });
      },
      height: function height() {
        this.$nextTick(function () {
          //this.$broadcast("updateWidth", this.width);
          if (this.isRowHeightFlex) {
            this.computeFlexRowCount(this.layout);
            this.flexRowHeight();
          }
        });
      },
      layout: function layout() {
        this.layoutUpdate();
      },
      colNum: function colNum(val) {
        this.eventBus.$emit("setColNum", val);
      },
      rowHeight: function rowHeight() {
        this.eventBus.$emit("setRowHeight", this.rowHeight);
      },
      isDraggable: function isDraggable() {
        this.eventBus.$emit("setDraggable", this.isDraggable);
      },
      isResizable: function isResizable() {
        this.eventBus.$emit("setResizable", this.isResizable);
      },
      responsive: function responsive() {
        if (!this.responsive) {
          this.$emit("update:layout", this.originalLayout);
          this.eventBus.$emit("setColNum", this.colNum);
        }
  
        this.onWindowResize();
      }
    },
    methods: {
      onWindowLoad: function onWindowLoad() {
        var self = this;
  
        if (self.width === null) {
          self.onWindowResize(); //self.width = self.$el.offsetWidth;
  
          addWindowEventListener("resize", self.onWindowResize);
        }
  
        compact(self.layout, self.verticalCompact);
        self.updateHeight();
        self.$nextTick(function () {
          var erd = elementResizeDetectorMaker({
            strategy: "scroll" //<- For ultra performance.
  
          });
          erd.listenTo(self.$refs.item, function () {
            self.onWindowResize();
          });
        });
      },
      layoutUpdate: function layoutUpdate() {
        if (this.layout !== undefined) {
          if (this.layout.length !== this.originalLayout.length) {
            // console.log("### LAYOUT UPDATE!", this.layout.length, this.originalLayout.length);
            var diff = this.findDifference(this.layout, this.originalLayout);
  
            if (diff.length > 0) {
              // console.log(diff);
              if (this.layout.length > this.originalLayout.length) {
                this.originalLayout = this.originalLayout.concat(diff);
              } else {
                this.originalLayout = this.originalLayout.filter(function (obj) {
                  return !diff.some(function (obj2) {
                    return obj.i === obj2.i;
                  });
                });
              }
            }
  
            this.lastLayoutLength = this.layout.length;
            this.initResponsiveFeatures();
          }
  
          compact(this.layout, this.verticalCompact);
          this.eventBus.$emit("updateWidth", this.width); // this.updateHeight();
  
          this.flexRowHeight();
        }
      },
      computeFlexRowCount: function computeFlexRowCount(layout) {
        if (this.isRowHeightFlex) {
          var rowCount = 0;
  
          for (var i = 0; i < layout.length; i++) {
            if (layout[i].y + layout[i].h > rowCount) rowCount = layout[i].y + layout[i].h;
          }
  
          this.flexRowCount = rowCount;
        }
      },
      flexRowHeight: function flexRowHeight() {
        if (this.isRowHeightFlex) {
          this.rowHeight = (window.innerHeight - (this.flexRowCount + 1) * this.margin[1]) / this.flexRowCount;
          this.eventBus.$emit("setRowHeight", this.rowHeight);
        }
  
        this.updateHeight();
      },
      updateHeight: function updateHeight() {
        this.mergedStyle = {
          height: this.containerHeight()
        };
      },
      onWindowResize: function onWindowResize() {
        if (this.$refs !== null && this.$refs.item !== null && this.$refs.item !== undefined) {
          this.width = this.$refs.item.offsetWidth;
        } // console.log("windowresize");
  
  
        this.height = window.innerHeight;
        this.eventBus.$emit("resizeEvent");
      },
      containerHeight: function containerHeight() {
        if (!this.autoSize) return;
        return bottom(this.layout) * (this.rowHeight + this.margin[1]) + this.margin[1] + "px";
      },
      dragEvent: function dragEvent(eventName, id, x, y, h, w) {
        //console.log(eventName + " id=" + id + ", x=" + x + ", y=" + y);
        var l = getLayoutItem(this.layout, id); //GetLayoutItem sometimes returns null object
  
        if (l === undefined || l === null) {
          l = {
            x: 0,
            y: 0
          };
        }
  
        if (eventName === "dragmove" || eventName === "dragstart") {
          this.placeholder.i = id;
          this.placeholder.x = l.x;
          this.placeholder.y = l.y;
          this.placeholder.w = w;
          this.placeholder.h = h;
          this.$nextTick(function () {
            this.isDragging = true;
          }); //this.$broadcast("updateWidth", this.width);
  
          this.eventBus.$emit("updateWidth", this.width);
        } else {
          this.$nextTick(function () {
            this.isDragging = false;
          });
        } // set layout element coordinates to dragged position
  
  
        l.x = x;
        l.y = y; // Move the element to the dragged location.
  
        this.layout = moveElement(this.layout, l, x, y, true);
        compact(this.layout, this.verticalCompact); // needed because vue can't detect changes on array element properties
  
        this.eventBus.$emit("compact");
        this.updateHeight();
  
        if (eventName === "dragend") {
          this.$emit("layout-updated", this.layout);
        }
      },
      resizeEvent: function resizeEvent(eventName, id, x, y, h, w) {
        if (eventName === "resizestart" || eventName === "resizemove") {
          this.placeholder.i = id;
          this.placeholder.x = x;
          this.placeholder.y = y;
          this.placeholder.w = w;
          this.placeholder.h = h;
          this.$nextTick(function () {
            this.isDragging = true;
          }); //this.$broadcast("updateWidth", this.width);
  
          this.eventBus.$emit("updateWidth", this.width);
        } else {
          this.$nextTick(function () {
            this.isDragging = false;
          });
        }
  
        var l = getLayoutItem(this.layout, id); //GetLayoutItem sometimes return null object
  
        if (l === undefined || l === null) {
          l = {
            h: 0,
            w: 0
          };
        }
  
        l.h = h;
        l.w = w;
        if (this.responsive) this.responsiveGridLayout();
        compact(this.layout, this.verticalCompact);
        this.eventBus.$emit("compact");
        this.updateHeight();
        if (eventName === "resizeend") this.$emit("layout-updated", this.layout);
      },
      // finds or generates new layouts for set breakpoints
      responsiveGridLayout: function responsiveGridLayout() {
        var newBreakpoint = getBreakpointFromWidth(this.breakpoints, this.width);
        var newCols = getColsFromBreakpoint(newBreakpoint, this.cols); // console.info(this.originalLayout);
        // console.info(newBreakpoint);
        // save actual layout in layouts
  
        if (this.lastBreakpoint != null && !this.layouts[this.lastBreakpoint]) this.layouts[this.lastBreakpoint] = cloneLayout(this.layout); // Find or generate a new layout.
  
        var layout = findOrGenerateResponsiveLayout(this.originalLayout, this.layouts, this.breakpoints, newBreakpoint, this.lastBreakpoint, newCols, this.verticalCompact);
        this.$emit("responsive-update", newBreakpoint, layout); // Store the new layout.
  
        this.layouts[newBreakpoint] = layout;
        this.computeFlexRowCount(layout); // new prop sync
  
        this.$emit("update:layout", layout);
        this.lastBreakpoint = newBreakpoint;
        this.eventBus.$emit("setColNum", getColsFromBreakpoint(newBreakpoint, this.cols));
      },
      // clear all responsive layouts
      initResponsiveFeatures: function initResponsiveFeatures() {
        // clear layouts
        //this.layouts = {};
        this.layouts = Object.assign({}, this.responsiveLayouts);
      },
      // find difference in layouts
      findDifference: function findDifference(layout, originalLayout) {
        //Find values that are in result1 but not in result2
        var uniqueResultOne = layout.filter(function (obj) {
          return !originalLayout.some(function (obj2) {
            return obj.i === obj2.i;
          });
        }); //Find values that are in result2 but not in result1
  
        var uniqueResultTwo = originalLayout.filter(function (obj) {
          return !layout.some(function (obj2) {
            return obj.i === obj2.i;
          });
        }); //Combine the two arrays of unique entries#
  
        return uniqueResultOne.concat(uniqueResultTwo);
      }
    }
  });
  // CONCATENATED MODULE: ./src/components/GridLayout.vue?vue&type=script&lang=js&
   /* harmony default export */ var components_GridLayoutvue_type_script_lang_js_ = (GridLayoutvue_type_script_lang_js_); 
  // EXTERNAL MODULE: ./src/components/GridLayout.vue?vue&type=style&index=0&lang=css&
  var GridLayoutvue_type_style_index_0_lang_css_ = __webpack_require__("e279");
  
  // CONCATENATED MODULE: ./src/components/GridLayout.vue
  
  
  
  
  
  
  /* normalize component */
  
  var GridLayout_component = normalizeComponent(
    components_GridLayoutvue_type_script_lang_js_,
    GridLayoutvue_type_template_id_25739c34_render,
    GridLayoutvue_type_template_id_25739c34_staticRenderFns,
    false,
    null,
    null,
    null
    
  )
  
  GridLayout_component.options.__file = "GridLayout.vue"
  /* harmony default export */ var GridLayout = (GridLayout_component.exports);
  // CONCATENATED MODULE: ./src/components/index.js
  
  
  
  
  
  
   // import ResponsiveGridLayout from './ResponsiveGridLayout.vue';
  
  var VueGridLayout = {
    // ResponsiveGridLayout,
    GridLayout: GridLayout,
    GridItem: GridItem // module.exports = VueGridLayout;
  
  };
  Object.keys(VueGridLayout).forEach(function (name) {
    external_commonjs_vue_commonjs2_vue_root_Vue_default.a.component(name, VueGridLayout[name]);
  });
  /* harmony default export */ var components = (VueGridLayout);
  
  // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
  /* concated harmony reexport GridLayout */__webpack_require__.d(__webpack_exports__, "GridLayout", function() { return GridLayout; });
  /* concated harmony reexport GridItem */__webpack_require__.d(__webpack_exports__, "GridItem", function() { return GridItem; });
  
  
  /* harmony default export */ var entry_lib = __webpack_exports__["default"] = (components);
  
  
  
  /***/ }),
  
  /***/ "fb3a":
  /***/ (function(module, exports, __webpack_require__) {
  
  var require;var require;/**
   * interact.js v1.3.4
   *
   * Copyright (c) 2012-2018 Taye Adeyemi <dev@taye.me>
   * Released under the MIT License.
   * https://raw.github.com/taye/interact.js/master/LICENSE
   */
  (function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  'use strict';
  
  /*
   * In a (windowless) server environment this file exports a factory function
   * that takes the window to use.
   *
   *     var interact = require('interact.js')(windowObject);
   *
   * See https://github.com/taye/interact.js/issues/187
   */
  if (typeof window === 'undefined') {
    module.exports = function (window) {
      require('./src/utils/window').init(window);
  
      return require('./src/index');
    };
  } else {
    module.exports = require('./src/index');
  }
  
  },{"./src/index":19,"./src/utils/window":52}],2:[function(require,module,exports){
  'use strict';
  
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  
  var extend = require('./utils/extend.js');
  
  function fireUntilImmediateStopped(event, listeners) {
    for (var _i = 0; _i < listeners.length; _i++) {
      var _ref;
  
      _ref = listeners[_i];
      var listener = _ref;
  
      if (event.immediatePropagationStopped) {
        break;
      }
  
      listener(event);
    }
  }
  
  var Eventable = function () {
    function Eventable(options) {
      _classCallCheck(this, Eventable);
  
      this.options = extend({}, options || {});
    }
  
    Eventable.prototype.fire = function fire(event) {
      var listeners = void 0;
      var onEvent = 'on' + event.type;
      var global = this.global;
  
      // Interactable#on() listeners
      if (listeners = this[event.type]) {
        fireUntilImmediateStopped(event, listeners);
      }
  
      // interactable.onevent listener
      if (this[onEvent]) {
        this[onEvent](event);
      }
  
      // interact.on() listeners
      if (!event.propagationStopped && global && (listeners = global[event.type])) {
        fireUntilImmediateStopped(event, listeners);
      }
    };
  
    Eventable.prototype.on = function on(eventType, listener) {
      // if this type of event was never bound
      if (this[eventType]) {
        this[eventType].push(listener);
      } else {
        this[eventType] = [listener];
      }
    };
  
    Eventable.prototype.off = function off(eventType, listener) {
      // if it is an action event type
      var eventList = this[eventType];
      var index = eventList ? eventList.indexOf(listener) : -1;
  
      if (index !== -1) {
        eventList.splice(index, 1);
      }
  
      if (eventList && eventList.length === 0 || !listener) {
        this[eventType] = undefined;
      }
    };
  
    return Eventable;
  }();
  
  module.exports = Eventable;
  
  },{"./utils/extend.js":41}],3:[function(require,module,exports){
  'use strict';
  
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  
  var extend = require('./utils/extend');
  var getOriginXY = require('./utils/getOriginXY');
  var defaults = require('./defaultOptions');
  var signals = require('./utils/Signals').new();
  
  var InteractEvent = function () {
    /** */
    function InteractEvent(interaction, event, action, phase, element, related) {
      var preEnd = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
  
      _classCallCheck(this, InteractEvent);
  
      var target = interaction.target;
      var deltaSource = (target && target.options || defaults).deltaSource;
      var origin = getOriginXY(target, element, action);
      var starting = phase === 'start';
      var ending = phase === 'end';
      var coords = starting ? interaction.startCoords : interaction.curCoords;
      var prevEvent = interaction.prevEvent;
  
      element = element || interaction.element;
  
      var page = extend({}, coords.page);
      var client = extend({}, coords.client);
  
      page.x -= origin.x;
      page.y -= origin.y;
  
      client.x -= origin.x;
      client.y -= origin.y;
  
      this.ctrlKey = event.ctrlKey;
      this.altKey = event.altKey;
      this.shiftKey = event.shiftKey;
      this.metaKey = event.metaKey;
      this.button = event.button;
      this.buttons = event.buttons;
      this.target = element;
      this.currentTarget = element;
      this.relatedTarget = related || null;
      this.preEnd = preEnd;
      this.type = action + (phase || '');
      this.interaction = interaction;
      this.interactable = target;
  
      this.t0 = starting ? interaction.downTimes[interaction.downTimes.length - 1] : prevEvent.t0;
  
      var signalArg = {
        interaction: interaction,
        event: event,
        action: action,
        phase: phase,
        element: element,
        related: related,
        page: page,
        client: client,
        coords: coords,
        starting: starting,
        ending: ending,
        deltaSource: deltaSource,
        iEvent: this
      };
  
      signals.fire('set-xy', signalArg);
  
      if (ending) {
        // use previous coords when ending
        this.pageX = prevEvent.pageX;
        this.pageY = prevEvent.pageY;
        this.clientX = prevEvent.clientX;
        this.clientY = prevEvent.clientY;
      } else {
        this.pageX = page.x;
        this.pageY = page.y;
        this.clientX = client.x;
        this.clientY = client.y;
      }
  
      this.x0 = interaction.startCoords.page.x - origin.x;
      this.y0 = interaction.startCoords.page.y - origin.y;
      this.clientX0 = interaction.startCoords.client.x - origin.x;
      this.clientY0 = interaction.startCoords.client.y - origin.y;
  
      signals.fire('set-delta', signalArg);
  
      this.timeStamp = coords.timeStamp;
      this.dt = interaction.pointerDelta.timeStamp;
      this.duration = this.timeStamp - this.t0;
  
      // speed and velocity in pixels per second
      this.speed = interaction.pointerDelta[deltaSource].speed;
      this.velocityX = interaction.pointerDelta[deltaSource].vx;
      this.velocityY = interaction.pointerDelta[deltaSource].vy;
  
      this.swipe = ending || phase === 'inertiastart' ? this.getSwipe() : null;
  
      signals.fire('new', signalArg);
    }
  
    InteractEvent.prototype.getSwipe = function getSwipe() {
      var interaction = this.interaction;
  
      if (interaction.prevEvent.speed < 600 || this.timeStamp - interaction.prevEvent.timeStamp > 150) {
        return null;
      }
  
      var angle = 180 * Math.atan2(interaction.prevEvent.velocityY, interaction.prevEvent.velocityX) / Math.PI;
      var overlap = 22.5;
  
      if (angle < 0) {
        angle += 360;
      }
  
      var left = 135 - overlap <= angle && angle < 225 + overlap;
      var up = 225 - overlap <= angle && angle < 315 + overlap;
  
      var right = !left && (315 - overlap <= angle || angle < 45 + overlap);
      var down = !up && 45 - overlap <= angle && angle < 135 + overlap;
  
      return {
        up: up,
        down: down,
        left: left,
        right: right,
        angle: angle,
        speed: interaction.prevEvent.speed,
        velocity: {
          x: interaction.prevEvent.velocityX,
          y: interaction.prevEvent.velocityY
        }
      };
    };
  
    InteractEvent.prototype.preventDefault = function preventDefault() {};
  
    /** */
  
  
    InteractEvent.prototype.stopImmediatePropagation = function stopImmediatePropagation() {
      this.immediatePropagationStopped = this.propagationStopped = true;
    };
  
    /** */
  
  
    InteractEvent.prototype.stopPropagation = function stopPropagation() {
      this.propagationStopped = true;
    };
  
    return InteractEvent;
  }();
  
  signals.on('set-delta', function (_ref) {
    var iEvent = _ref.iEvent,
        interaction = _ref.interaction,
        starting = _ref.starting,
        deltaSource = _ref.deltaSource;
  
    var prevEvent = starting ? iEvent : interaction.prevEvent;
  
    if (deltaSource === 'client') {
      iEvent.dx = iEvent.clientX - prevEvent.clientX;
      iEvent.dy = iEvent.clientY - prevEvent.clientY;
    } else {
      iEvent.dx = iEvent.pageX - prevEvent.pageX;
      iEvent.dy = iEvent.pageY - prevEvent.pageY;
    }
  });
  
  InteractEvent.signals = signals;
  
  module.exports = InteractEvent;
  
  },{"./defaultOptions":18,"./utils/Signals":34,"./utils/extend":41,"./utils/getOriginXY":42}],4:[function(require,module,exports){
  'use strict';
  
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  
  var clone = require('./utils/clone');
  var is = require('./utils/is');
  var events = require('./utils/events');
  var extend = require('./utils/extend');
  var actions = require('./actions/base');
  var scope = require('./scope');
  var Eventable = require('./Eventable');
  var defaults = require('./defaultOptions');
  var signals = require('./utils/Signals').new();
  
  var _require = require('./utils/domUtils'),
      getElementRect = _require.getElementRect,
      nodeContains = _require.nodeContains,
      trySelector = _require.trySelector,
      matchesSelector = _require.matchesSelector;
  
  var _require2 = require('./utils/window'),
      getWindow = _require2.getWindow;
  
  var _require3 = require('./utils/arr'),
      contains = _require3.contains;
  
  var _require4 = require('./utils/browser'),
      wheelEvent = _require4.wheelEvent;
  
  // all set interactables
  
  
  scope.interactables = [];
  
  var Interactable = function () {
    /** */
    function Interactable(target, options) {
      _classCallCheck(this, Interactable);
  
      options = options || {};
  
      this.target = target;
      this.events = new Eventable();
      this._context = options.context || scope.document;
      this._win = getWindow(trySelector(target) ? this._context : target);
      this._doc = this._win.document;
  
      signals.fire('new', {
        target: target,
        options: options,
        interactable: this,
        win: this._win
      });
  
      scope.addDocument(this._doc, this._win);
  
      scope.interactables.push(this);
  
      this.set(options);
    }
  
    Interactable.prototype.setOnEvents = function setOnEvents(action, phases) {
      var onAction = 'on' + action;
  
      if (is.function(phases.onstart)) {
        this.events[onAction + 'start'] = phases.onstart;
      }
      if (is.function(phases.onmove)) {
        this.events[onAction + 'move'] = phases.onmove;
      }
      if (is.function(phases.onend)) {
        this.events[onAction + 'end'] = phases.onend;
      }
      if (is.function(phases.oninertiastart)) {
        this.events[onAction + 'inertiastart'] = phases.oninertiastart;
      }
  
      return this;
    };
  
    Interactable.prototype.setPerAction = function setPerAction(action, options) {
      // for all the default per-action options
      for (var option in options) {
        // if this option exists for this action
        if (option in defaults[action]) {
          // if the option in the options arg is an object value
          if (is.object(options[option])) {
            // duplicate the object and merge
            this.options[action][option] = clone(this.options[action][option] || {});
            extend(this.options[action][option], options[option]);
  
            if (is.object(defaults.perAction[option]) && 'enabled' in defaults.perAction[option]) {
              this.options[action][option].enabled = options[option].enabled === false ? false : true;
            }
          } else if (is.bool(options[option]) && is.object(defaults.perAction[option])) {
            this.options[action][option].enabled = options[option];
          } else if (options[option] !== undefined) {
            // or if it's not undefined, do a plain assignment
            this.options[action][option] = options[option];
          }
        }
      }
    };
  
    /**
     * The default function to get an Interactables bounding rect. Can be
     * overridden using {@link Interactable.rectChecker}.
     *
     * @param {Element} [element] The element to measure.
     * @return {object} The object's bounding rectangle.
     */
  
  
    Interactable.prototype.getRect = function getRect(element) {
      element = element || this.target;
  
      if (is.string(this.target) && !is.element(element)) {
        element = this._context.querySelector(this.target);
      }
  
      return getElementRect(element);
    };
  
    /**
     * Returns or sets the function used to calculate the interactable's
     * element's rectangle
     *
     * @param {function} [checker] A function which returns this Interactable's
     * bounding rectangle. See {@link Interactable.getRect}
     * @return {function | object} The checker function or this Interactable
     */
  
  
    Interactable.prototype.rectChecker = function rectChecker(checker) {
      if (is.function(checker)) {
        this.getRect = checker;
  
        return this;
      }
  
      if (checker === null) {
        delete this.options.getRect;
  
        return this;
      }
  
      return this.getRect;
    };
  
    Interactable.prototype._backCompatOption = function _backCompatOption(optionName, newValue) {
      if (trySelector(newValue) || is.object(newValue)) {
        this.options[optionName] = newValue;
  
        for (var _i = 0; _i < actions.names.length; _i++) {
          var _ref;
  
          _ref = actions.names[_i];
          var action = _ref;
  
          this.options[action][optionName] = newValue;
        }
  
        return this;
      }
  
      return this.options[optionName];
    };
  
    /**
     * Gets or sets the origin of the Interactable's element.  The x and y
     * of the origin will be subtracted from action event coordinates.
     *
     * @param {Element | object | string} [origin] An HTML or SVG Element whose
     * rect will be used, an object eg. { x: 0, y: 0 } or string 'parent', 'self'
     * or any CSS selector
     *
     * @return {object} The current origin or this Interactable
     */
  
  
    Interactable.prototype.origin = function origin(newValue) {
      return this._backCompatOption('origin', newValue);
    };
  
    /**
     * Returns or sets the mouse coordinate types used to calculate the
     * movement of the pointer.
     *
     * @param {string} [newValue] Use 'client' if you will be scrolling while
     * interacting; Use 'page' if you want autoScroll to work
     * @return {string | object} The current deltaSource or this Interactable
     */
  
  
    Interactable.prototype.deltaSource = function deltaSource(newValue) {
      if (newValue === 'page' || newValue === 'client') {
        this.options.deltaSource = newValue;
  
        return this;
      }
  
      return this.options.deltaSource;
    };
  
    /**
     * Gets the selector context Node of the Interactable. The default is
     * `window.document`.
     *
     * @return {Node} The context Node of this Interactable
     */
  
  
    Interactable.prototype.context = function context() {
      return this._context;
    };
  
    Interactable.prototype.inContext = function inContext(element) {
      return this._context === element.ownerDocument || nodeContains(this._context, element);
    };
  
    /**
     * Calls listeners for the given InteractEvent type bound globally
     * and directly to this Interactable
     *
     * @param {InteractEvent} iEvent The InteractEvent object to be fired on this
     * Interactable
     * @return {Interactable} this Interactable
     */
  
  
    Interactable.prototype.fire = function fire(iEvent) {
      this.events.fire(iEvent);
  
      return this;
    };
  
    Interactable.prototype._onOffMultiple = function _onOffMultiple(method, eventType, listener, options) {
      if (is.string(eventType) && eventType.search(' ') !== -1) {
        eventType = eventType.trim().split(/ +/);
      }
  
      if (is.array(eventType)) {
        for (var _i2 = 0; _i2 < eventType.length; _i2++) {
          var _ref2;
  
          _ref2 = eventType[_i2];
          var type = _ref2;
  
          this[method](type, listener, options);
        }
  
        return true;
      }
  
      if (is.object(eventType)) {
        for (var prop in eventType) {
          this[method](prop, eventType[prop], listener);
        }
  
        return true;
      }
    };
  
    /**
     * Binds a listener for an InteractEvent, pointerEvent or DOM event.
     *
     * @param {string | array | object} eventType  The types of events to listen
     * for
     * @param {function} listener   The function event (s)
     * @param {object | boolean} [options]    options object or useCapture flag
     * for addEventListener
     * @return {object} This Interactable
     */
  
  
    Interactable.prototype.on = function on(eventType, listener, options) {
      if (this._onOffMultiple('on', eventType, listener, options)) {
        return this;
      }
  
      if (eventType === 'wheel') {
        eventType = wheelEvent;
      }
  
      if (contains(Interactable.eventTypes, eventType)) {
        this.events.on(eventType, listener);
      }
      // delegated event for selector
      else if (is.string(this.target)) {
          events.addDelegate(this.target, this._context, eventType, listener, options);
        } else {
          events.add(this.target, eventType, listener, options);
        }
  
      return this;
    };
  
    /**
     * Removes an InteractEvent, pointerEvent or DOM event listener
     *
     * @param {string | array | object} eventType The types of events that were
     * listened for
     * @param {function} listener The listener function to be removed
     * @param {object | boolean} [options] options object or useCapture flag for
     * removeEventListener
     * @return {object} This Interactable
     */
  
  
    Interactable.prototype.off = function off(eventType, listener, options) {
      if (this._onOffMultiple('off', eventType, listener, options)) {
        return this;
      }
  
      if (eventType === 'wheel') {
        eventType = wheelEvent;
      }
  
      // if it is an action event type
      if (contains(Interactable.eventTypes, eventType)) {
        this.events.off(eventType, listener);
      }
      // delegated event
      else if (is.string(this.target)) {
          events.removeDelegate(this.target, this._context, eventType, listener, options);
        }
        // remove listener from this Interatable's element
        else {
            events.remove(this.target, eventType, listener, options);
          }
  
      return this;
    };
  
    /**
     * Reset the options of this Interactable
     *
     * @param {object} options The new settings to apply
     * @return {object} This Interactable
     */
  
  
    Interactable.prototype.set = function set(options) {
      if (!is.object(options)) {
        options = {};
      }
  
      this.options = clone(defaults.base);
  
      var perActions = clone(defaults.perAction);
  
      for (var actionName in actions.methodDict) {
        var methodName = actions.methodDict[actionName];
  
        this.options[actionName] = clone(defaults[actionName]);
  
        this.setPerAction(actionName, perActions);
  
        this[methodName](options[actionName]);
      }
  
      for (var _i3 = 0; _i3 < Interactable.settingsMethods.length; _i3++) {
        var _ref3;
  
        _ref3 = Interactable.settingsMethods[_i3];
        var setting = _ref3;
  
        this.options[setting] = defaults.base[setting];
  
        if (setting in options) {
          this[setting](options[setting]);
        }
      }
  
      signals.fire('set', {
        options: options,
        interactable: this
      });
  
      return this;
    };
  
    /**
     * Remove this interactable from the list of interactables and remove it's
     * action capabilities and event listeners
     *
     * @return {interact}
     */
  
  
    Interactable.prototype.unset = function unset() {
      events.remove(this.target, 'all');
  
      if (is.string(this.target)) {
        // remove delegated events
        for (var type in events.delegatedEvents) {
          var delegated = events.delegatedEvents[type];
  
          if (delegated.selectors[0] === this.target && delegated.contexts[0] === this._context) {
  
            delegated.selectors.splice(0, 1);
            delegated.contexts.splice(0, 1);
            delegated.listeners.splice(0, 1);
  
            // remove the arrays if they are empty
            if (!delegated.selectors.length) {
              delegated[type] = null;
            }
          }
  
          events.remove(this._context, type, events.delegateListener);
          events.remove(this._context, type, events.delegateUseCapture, true);
        }
      } else {
        events.remove(this, 'all');
      }
  
      signals.fire('unset', { interactable: this });
  
      scope.interactables.splice(scope.interactables.indexOf(this), 1);
  
      // Stop related interactions when an Interactable is unset
      for (var _i4 = 0; _i4 < (scope.interactions || []).length; _i4++) {
        var _ref4;
  
        _ref4 = (scope.interactions || [])[_i4];
        var interaction = _ref4;
  
        if (interaction.target === this && interaction.interacting() && !interaction._ending) {
          interaction.stop();
        }
      }
  
      return scope.interact;
    };
  
    return Interactable;
  }();
  
  scope.interactables.indexOfElement = function indexOfElement(target, context) {
    context = context || scope.document;
  
    for (var i = 0; i < this.length; i++) {
      var interactable = this[i];
  
      if (interactable.target === target && interactable._context === context) {
        return i;
      }
    }
    return -1;
  };
  
  scope.interactables.get = function interactableGet(element, options, dontCheckInContext) {
    var ret = this[this.indexOfElement(element, options && options.context)];
  
    return ret && (is.string(element) || dontCheckInContext || ret.inContext(element)) ? ret : null;
  };
  
  scope.interactables.forEachMatch = function (element, callback) {
    for (var _i5 = 0; _i5 < this.length; _i5++) {
      var _ref5;
  
      _ref5 = this[_i5];
      var interactable = _ref5;
  
      var ret = void 0;
  
      if ((is.string(interactable.target)
      // target is a selector and the element matches
      ? is.element(element) && matchesSelector(element, interactable.target) :
      // target is the element
      element === interactable.target) &&
      // the element is in context
      interactable.inContext(element)) {
        ret = callback(interactable);
      }
  
      if (ret !== undefined) {
        return ret;
      }
    }
  };
  
  // all interact.js eventTypes
  Interactable.eventTypes = scope.eventTypes = [];
  
  Interactable.signals = signals;
  
  Interactable.settingsMethods = ['deltaSource', 'origin', 'preventDefault', 'rectChecker'];
  
  module.exports = Interactable;
  
  },{"./Eventable":2,"./actions/base":6,"./defaultOptions":18,"./scope":33,"./utils/Signals":34,"./utils/arr":35,"./utils/browser":36,"./utils/clone":37,"./utils/domUtils":39,"./utils/events":40,"./utils/extend":41,"./utils/is":46,"./utils/window":52}],5:[function(require,module,exports){
  'use strict';
  
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  
  var scope = require('./scope');
  var utils = require('./utils');
  var events = require('./utils/events');
  var browser = require('./utils/browser');
  var domObjects = require('./utils/domObjects');
  var finder = require('./utils/interactionFinder');
  var signals = require('./utils/Signals').new();
  
  var listeners = {};
  var methodNames = ['pointerDown', 'pointerMove', 'pointerUp', 'updatePointer', 'removePointer'];
  
  // for ignoring browser's simulated mouse events
  var prevTouchTime = 0;
  
  // all active and idle interactions
  scope.interactions = [];
  
  var Interaction = function () {
    /** */
    function Interaction(_ref) {
      var pointerType = _ref.pointerType;
  
      _classCallCheck(this, Interaction);
  
      this.target = null; // current interactable being interacted with
      this.element = null; // the target element of the interactable
  
      this.prepared = { // action that's ready to be fired on next move event
        name: null,
        axis: null,
        edges: null
      };
  
      // keep track of added pointers
      this.pointers = [];
      this.pointerIds = [];
      this.downTargets = [];
      this.downTimes = [];
  
      // Previous native pointer move event coordinates
      this.prevCoords = {
        page: { x: 0, y: 0 },
        client: { x: 0, y: 0 },
        timeStamp: 0
      };
      // current native pointer move event coordinates
      this.curCoords = {
        page: { x: 0, y: 0 },
        client: { x: 0, y: 0 },
        timeStamp: 0
      };
  
      // Starting InteractEvent pointer coordinates
      this.startCoords = {
        page: { x: 0, y: 0 },
        client: { x: 0, y: 0 },
        timeStamp: 0
      };
  
      // Change in coordinates and time of the pointer
      this.pointerDelta = {
        page: { x: 0, y: 0, vx: 0, vy: 0, speed: 0 },
        client: { x: 0, y: 0, vx: 0, vy: 0, speed: 0 },
        timeStamp: 0
      };
  
      this.downEvent = null; // pointerdown/mousedown/touchstart event
      this.downPointer = {};
  
      this._eventTarget = null;
      this._curEventTarget = null;
  
      this.prevEvent = null; // previous action event
  
      this.pointerIsDown = false;
      this.pointerWasMoved = false;
      this._interacting = false;
      this._ending = false;
  
      this.pointerType = pointerType;
  
      signals.fire('new', this);
  
      scope.interactions.push(this);
    }
  
    Interaction.prototype.pointerDown = function pointerDown(pointer, event, eventTarget) {
      var pointerIndex = this.updatePointer(pointer, event, true);
  
      signals.fire('down', {
        pointer: pointer,
        event: event,
        eventTarget: eventTarget,
        pointerIndex: pointerIndex,
        interaction: this
      });
    };
  
    /**
     * ```js
     * interact(target)
     *   .draggable({
     *     // disable the default drag start by down->move
     *     manualStart: true
     *   })
     *   // start dragging after the user holds the pointer down
     *   .on('hold', function (event) {
     *     var interaction = event.interaction;
     *
     *     if (!interaction.interacting()) {
     *       interaction.start({ name: 'drag' },
     *                         event.interactable,
     *                         event.currentTarget);
     *     }
     * });
     * ```
     *
     * Start an action with the given Interactable and Element as tartgets. The
     * action must be enabled for the target Interactable and an appropriate
     * number of pointers must be held down - 1 for drag/resize, 2 for gesture.
     *
     * Use it with `interactable.<action>able({ manualStart: false })` to always
     * [start actions manually](https://github.com/taye/interact.js/issues/114)
     *
     * @param {object} action   The action to be performed - drag, resize, etc.
     * @param {Interactable} target  The Interactable to target
     * @param {Element} element The DOM Element to target
     * @return {object} interact
     */
  
  
    Interaction.prototype.start = function start(action, target, element) {
      if (this.interacting() || !this.pointerIsDown || this.pointerIds.length < (action.name === 'gesture' ? 2 : 1)) {
        return;
      }
  
      // if this interaction had been removed after stopping
      // add it back
      if (scope.interactions.indexOf(this) === -1) {
        scope.interactions.push(this);
      }
  
      utils.copyAction(this.prepared, action);
      this.target = target;
      this.element = element;
  
      signals.fire('action-start', {
        interaction: this,
        event: this.downEvent
      });
    };
  
    Interaction.prototype.pointerMove = function pointerMove(pointer, event, eventTarget) {
      if (!this.simulation) {
        this.updatePointer(pointer);
        utils.setCoords(this.curCoords, this.pointers);
      }
  
      var duplicateMove = this.curCoords.page.x === this.prevCoords.page.x && this.curCoords.page.y === this.prevCoords.page.y && this.curCoords.client.x === this.prevCoords.client.x && this.curCoords.client.y === this.prevCoords.client.y;
  
      var dx = void 0;
      var dy = void 0;
  
      // register movement greater than pointerMoveTolerance
      if (this.pointerIsDown && !this.pointerWasMoved) {
        dx = this.curCoords.client.x - this.startCoords.client.x;
        dy = this.curCoords.client.y - this.startCoords.client.y;
  
        this.pointerWasMoved = utils.hypot(dx, dy) > Interaction.pointerMoveTolerance;
      }
  
      var signalArg = {
        pointer: pointer,
        pointerIndex: this.getPointerIndex(pointer),
        event: event,
        eventTarget: eventTarget,
        dx: dx,
        dy: dy,
        duplicate: duplicateMove,
        interaction: this,
        interactingBeforeMove: this.interacting()
      };
  
      if (!duplicateMove) {
        // set pointer coordinate, time changes and speeds
        utils.setCoordDeltas(this.pointerDelta, this.prevCoords, this.curCoords);
      }
  
      signals.fire('move', signalArg);
  
      if (!duplicateMove) {
        // if interacting, fire an 'action-move' signal etc
        if (this.interacting()) {
          this.doMove(signalArg);
        }
  
        if (this.pointerWasMoved) {
          utils.copyCoords(this.prevCoords, this.curCoords);
        }
      }
    };
  
    /**
     * ```js
     * interact(target)
     *   .draggable(true)
     *   .on('dragmove', function (event) {
     *     if (someCondition) {
     *       // change the snap settings
     *       event.interactable.draggable({ snap: { targets: [] }});
     *       // fire another move event with re-calculated snap
     *       event.interaction.doMove();
     *     }
     *   });
     * ```
     *
     * Force a move of the current action at the same coordinates. Useful if
     * snap/restrict has been changed and you want a movement with the new
     * settings.
     */
  
  
    Interaction.prototype.doMove = function doMove(signalArg) {
      signalArg = utils.extend({
        pointer: this.pointers[0],
        event: this.prevEvent,
        eventTarget: this._eventTarget,
        interaction: this
      }, signalArg || {});
  
      signals.fire('before-action-move', signalArg);
  
      if (!this._dontFireMove) {
        signals.fire('action-move', signalArg);
      }
  
      this._dontFireMove = false;
    };
  
    // End interact move events and stop auto-scroll unless simulation is running
  
  
    Interaction.prototype.pointerUp = function pointerUp(pointer, event, eventTarget, curEventTarget) {
      var pointerIndex = this.getPointerIndex(pointer);
  
      signals.fire(/cancel$/i.test(event.type) ? 'cancel' : 'up', {
        pointer: pointer,
        pointerIndex: pointerIndex,
        event: event,
        eventTarget: eventTarget,
        curEventTarget: curEventTarget,
        interaction: this
      });
  
      if (!this.simulation) {
        this.end(event);
      }
  
      this.pointerIsDown = false;
      this.removePointer(pointer, event);
    };
  
    /**
     * ```js
     * interact(target)
     *   .draggable(true)
     *   .on('move', function (event) {
     *     if (event.pageX > 1000) {
     *       // end the current action
     *       event.interaction.end();
     *       // stop all further listeners from being called
     *       event.stopImmediatePropagation();
     *     }
     *   });
     * ```
     *
     * Stop the current action and fire an end event. Inertial movement does
     * not happen.
     *
     * @param {PointerEvent} [event]
     */
  
  
    Interaction.prototype.end = function end(event) {
      this._ending = true;
  
      event = event || this.prevEvent;
  
      if (this.interacting()) {
        signals.fire('action-end', {
          event: event,
          interaction: this
        });
      }
  
      this.stop();
      this._ending = false;
    };
  
    Interaction.prototype.currentAction = function currentAction() {
      return this._interacting ? this.prepared.name : null;
    };
  
    Interaction.prototype.interacting = function interacting() {
      return this._interacting;
    };
  
    /** */
  
  
    Interaction.prototype.stop = function stop() {
      signals.fire('stop', { interaction: this });
  
      if (this._interacting) {
        signals.fire('stop-active', { interaction: this });
        signals.fire('stop-' + this.prepared.name, { interaction: this });
      }
  
      this.target = this.element = null;
  
      this._interacting = false;
      this.prepared.name = this.prevEvent = null;
    };
  
    Interaction.prototype.getPointerIndex = function getPointerIndex(pointer) {
      // mouse and pen interactions may have only one pointer
      if (this.pointerType === 'mouse' || this.pointerType === 'pen') {
        return 0;
      }
  
      return this.pointerIds.indexOf(utils.getPointerId(pointer));
    };
  
    Interaction.prototype.updatePointer = function updatePointer(pointer, event) {
      var down = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : event && /(down|start)$/i.test(event.type);
  
      var id = utils.getPointerId(pointer);
      var index = this.getPointerIndex(pointer);
  
      if (index === -1) {
        index = this.pointerIds.length;
        this.pointerIds[index] = id;
      }
  
      if (down) {
        signals.fire('update-pointer-down', {
          pointer: pointer,
          event: event,
          down: down,
          pointerId: id,
          pointerIndex: index,
          interaction: this
        });
      }
  
      this.pointers[index] = pointer;
  
      return index;
    };
  
    Interaction.prototype.removePointer = function removePointer(pointer, event) {
      var index = this.getPointerIndex(pointer);
  
      if (index === -1) {
        return;
      }
  
      signals.fire('remove-pointer', {
        pointer: pointer,
        event: event,
        pointerIndex: index,
        interaction: this
      });
  
      this.pointers.splice(index, 1);
      this.pointerIds.splice(index, 1);
      this.downTargets.splice(index, 1);
      this.downTimes.splice(index, 1);
    };
  
    Interaction.prototype._updateEventTargets = function _updateEventTargets(target, currentTarget) {
      this._eventTarget = target;
      this._curEventTarget = currentTarget;
    };
  
    return Interaction;
  }();
  
  for (var _i = 0; _i < methodNames.length; _i++) {
    var method = methodNames[_i];
    listeners[method] = doOnInteractions(method);
  }
  
  function doOnInteractions(method) {
    return function (event) {
      var pointerType = utils.getPointerType(event);
  
      var _utils$getEventTarget = utils.getEventTargets(event),
          eventTarget = _utils$getEventTarget[0],
          curEventTarget = _utils$getEventTarget[1];
  
      var matches = []; // [ [pointer, interaction], ...]
  
      if (browser.supportsTouch && /touch/.test(event.type)) {
        prevTouchTime = new Date().getTime();
  
        for (var _i2 = 0; _i2 < event.changedTouches.length; _i2++) {
          var _ref2;
  
          _ref2 = event.changedTouches[_i2];
          var changedTouch = _ref2;
  
          var pointer = changedTouch;
          var interaction = finder.search(pointer, event.type, eventTarget);
  
          matches.push([pointer, interaction || new Interaction({ pointerType: pointerType })]);
        }
      } else {
        var invalidPointer = false;
  
        if (!browser.supportsPointerEvent && /mouse/.test(event.type)) {
          // ignore mouse events while touch interactions are active
          for (var i = 0; i < scope.interactions.length && !invalidPointer; i++) {
            invalidPointer = scope.interactions[i].pointerType !== 'mouse' && scope.interactions[i].pointerIsDown;
          }
  
          // try to ignore mouse events that are simulated by the browser
          // after a touch event
          invalidPointer = invalidPointer || new Date().getTime() - prevTouchTime < 500
          // on iOS and Firefox Mobile, MouseEvent.timeStamp is zero if simulated
          || event.timeStamp === 0;
        }
  
        if (!invalidPointer) {
          var _interaction = finder.search(event, event.type, eventTarget);
  
          if (!_interaction) {
            _interaction = new Interaction({ pointerType: pointerType });
          }
  
          matches.push([event, _interaction]);
        }
      }
  
      for (var _i3 = 0; _i3 < matches.length; _i3++) {
        var _ref3 = matches[_i3];
        var _pointer = _ref3[0];
        var _interaction2 = _ref3[1];
  
        _interaction2._updateEventTargets(eventTarget, curEventTarget);
        _interaction2[method](_pointer, event, eventTarget, curEventTarget);
      }
    };
  }
  
  function endAll(event) {
    for (var _i4 = 0; _i4 < scope.interactions.length; _i4++) {
      var _ref4;
  
      _ref4 = scope.interactions[_i4];
      var interaction = _ref4;
  
      interaction.end(event);
      signals.fire('endall', { event: event, interaction: interaction });
    }
  }
  
  var docEvents = {/* 'eventType': listenerFunc */};
  var pEventTypes = browser.pEventTypes;
  
  if (domObjects.PointerEvent) {
    docEvents[pEventTypes.down] = listeners.pointerDown;
    docEvents[pEventTypes.move] = listeners.pointerMove;
    docEvents[pEventTypes.up] = listeners.pointerUp;
    docEvents[pEventTypes.cancel] = listeners.pointerUp;
  } else {
    docEvents.mousedown = listeners.pointerDown;
    docEvents.mousemove = listeners.pointerMove;
    docEvents.mouseup = listeners.pointerUp;
  
    docEvents.touchstart = listeners.pointerDown;
    docEvents.touchmove = listeners.pointerMove;
    docEvents.touchend = listeners.pointerUp;
    docEvents.touchcancel = listeners.pointerUp;
  }
  
  docEvents.blur = endAll;
  
  function onDocSignal(_ref5, signalName) {
    var doc = _ref5.doc;
  
    var eventMethod = signalName.indexOf('add') === 0 ? events.add : events.remove;
  
    // delegate event listener
    for (var eventType in scope.delegatedEvents) {
      eventMethod(doc, eventType, events.delegateListener);
      eventMethod(doc, eventType, events.delegateUseCapture, true);
    }
  
    for (var _eventType in docEvents) {
      eventMethod(doc, _eventType, docEvents[_eventType], browser.isIOS ? { passive: false } : undefined);
    }
  }
  
  signals.on('update-pointer-down', function (_ref6) {
    var interaction = _ref6.interaction,
        pointer = _ref6.pointer,
        pointerId = _ref6.pointerId,
        pointerIndex = _ref6.pointerIndex,
        event = _ref6.event,
        eventTarget = _ref6.eventTarget,
        down = _ref6.down;
  
    interaction.pointerIds[pointerIndex] = pointerId;
    interaction.pointers[pointerIndex] = pointer;
  
    if (down) {
      interaction.pointerIsDown = true;
    }
  
    if (!interaction.interacting()) {
      utils.setCoords(interaction.startCoords, interaction.pointers);
  
      utils.copyCoords(interaction.curCoords, interaction.startCoords);
      utils.copyCoords(interaction.prevCoords, interaction.startCoords);
  
      interaction.downEvent = event;
      interaction.downTimes[pointerIndex] = interaction.curCoords.timeStamp;
      interaction.downTargets[pointerIndex] = eventTarget || event && utils.getEventTargets(event)[0];
      interaction.pointerWasMoved = false;
  
      utils.pointerExtend(interaction.downPointer, pointer);
    }
  });
  
  scope.signals.on('add-document', onDocSignal);
  scope.signals.on('remove-document', onDocSignal);
  
  Interaction.pointerMoveTolerance = 1;
  Interaction.doOnInteractions = doOnInteractions;
  Interaction.endAll = endAll;
  Interaction.signals = signals;
  Interaction.docEvents = docEvents;
  
  scope.endAllInteractions = endAll;
  
  module.exports = Interaction;
  
  },{"./scope":33,"./utils":44,"./utils/Signals":34,"./utils/browser":36,"./utils/domObjects":38,"./utils/events":40,"./utils/interactionFinder":45}],6:[function(require,module,exports){
  'use strict';
  
  var Interaction = require('../Interaction');
  var InteractEvent = require('../InteractEvent');
  
  var actions = {
    firePrepared: firePrepared,
    names: [],
    methodDict: {}
  };
  
  Interaction.signals.on('action-start', function (_ref) {
    var interaction = _ref.interaction,
        event = _ref.event;
  
    interaction._interacting = true;
    firePrepared(interaction, event, 'start');
  });
  
  Interaction.signals.on('action-move', function (_ref2) {
    var interaction = _ref2.interaction,
        event = _ref2.event,
        preEnd = _ref2.preEnd;
  
    firePrepared(interaction, event, 'move', preEnd);
  
    // if the action was ended in a listener
    if (!interaction.interacting()) {
      return false;
    }
  });
  
  Interaction.signals.on('action-end', function (_ref3) {
    var interaction = _ref3.interaction,
        event = _ref3.event;
  
    firePrepared(interaction, event, 'end');
  });
  
  function firePrepared(interaction, event, phase, preEnd) {
    var actionName = interaction.prepared.name;
  
    var newEvent = new InteractEvent(interaction, event, actionName, phase, interaction.element, null, preEnd);
  
    interaction.target.fire(newEvent);
    interaction.prevEvent = newEvent;
  }
  
  module.exports = actions;
  
  },{"../InteractEvent":3,"../Interaction":5}],7:[function(require,module,exports){
  'use strict';
  
  var actions = require('./base');
  var utils = require('../utils');
  var InteractEvent = require('../InteractEvent');
  /** @lends Interactable */
  var Interactable = require('../Interactable');
  var Interaction = require('../Interaction');
  var defaultOptions = require('../defaultOptions');
  
  var drag = {
    defaults: {
      enabled: false,
      mouseButtons: null,
  
      origin: null,
      snap: null,
      restrict: null,
      inertia: null,
      autoScroll: null,
  
      startAxis: 'xy',
      lockAxis: 'xy'
    },
  
    checker: function checker(pointer, event, interactable) {
      var dragOptions = interactable.options.drag;
  
      return dragOptions.enabled ? { name: 'drag', axis: dragOptions.lockAxis === 'start' ? dragOptions.startAxis : dragOptions.lockAxis } : null;
    },
  
    getCursor: function getCursor() {
      return 'move';
    }
  };
  
  Interaction.signals.on('before-action-move', function (_ref) {
    var interaction = _ref.interaction;
  
    if (interaction.prepared.name !== 'drag') {
      return;
    }
  
    var axis = interaction.prepared.axis;
  
    if (axis === 'x') {
      interaction.curCoords.page.y = interaction.startCoords.page.y;
      interaction.curCoords.client.y = interaction.startCoords.client.y;
  
      interaction.pointerDelta.page.speed = Math.abs(interaction.pointerDelta.page.vx);
      interaction.pointerDelta.client.speed = Math.abs(interaction.pointerDelta.client.vx);
      interaction.pointerDelta.client.vy = 0;
      interaction.pointerDelta.page.vy = 0;
    } else if (axis === 'y') {
      interaction.curCoords.page.x = interaction.startCoords.page.x;
      interaction.curCoords.client.x = interaction.startCoords.client.x;
  
      interaction.pointerDelta.page.speed = Math.abs(interaction.pointerDelta.page.vy);
      interaction.pointerDelta.client.speed = Math.abs(interaction.pointerDelta.client.vy);
      interaction.pointerDelta.client.vx = 0;
      interaction.pointerDelta.page.vx = 0;
    }
  });
  
  // dragmove
  InteractEvent.signals.on('new', function (_ref2) {
    var iEvent = _ref2.iEvent,
        interaction = _ref2.interaction;
  
    if (iEvent.type !== 'dragmove') {
      return;
    }
  
    var axis = interaction.prepared.axis;
  
    if (axis === 'x') {
      iEvent.pageY = interaction.startCoords.page.y;
      iEvent.clientY = interaction.startCoords.client.y;
      iEvent.dy = 0;
    } else if (axis === 'y') {
      iEvent.pageX = interaction.startCoords.page.x;
      iEvent.clientX = interaction.startCoords.client.x;
      iEvent.dx = 0;
    }
  });
  
  /**
   * ```js
   * interact(element).draggable({
   *     onstart: function (event) {},
   *     onmove : function (event) {},
   *     onend  : function (event) {},
   *
   *     // the axis in which the first movement must be
   *     // for the drag sequence to start
   *     // 'xy' by default - any direction
   *     startAxis: 'x' || 'y' || 'xy',
   *
   *     // 'xy' by default - don't restrict to one axis (move in any direction)
   *     // 'x' or 'y' to restrict movement to either axis
   *     // 'start' to restrict movement to the axis the drag started in
   *     lockAxis: 'x' || 'y' || 'xy' || 'start',
   *
   *     // max number of drags that can happen concurrently
   *     // with elements of this Interactable. Infinity by default
   *     max: Infinity,
   *
   *     // max number of drags that can target the same element+Interactable
   *     // 1 by default
   *     maxPerElement: 2
   * });
   *
   * var isDraggable = interact('element').draggable(); // true
   * ```
   *
   * Get or set whether drag actions can be performed on the target
   *
   * @param {boolean | object} [options] true/false or An object with event
   * listeners to be fired on drag events (object makes the Interactable
   * draggable)
   * @return {boolean | Interactable} boolean indicating if this can be the
   * target of drag events, or this Interctable
   */
  Interactable.prototype.draggable = function (options) {
    if (utils.is.object(options)) {
      this.options.drag.enabled = options.enabled === false ? false : true;
      this.setPerAction('drag', options);
      this.setOnEvents('drag', options);
  
      if (/^(xy|x|y|start)$/.test(options.lockAxis)) {
        this.options.drag.lockAxis = options.lockAxis;
      }
      if (/^(xy|x|y)$/.test(options.startAxis)) {
        this.options.drag.startAxis = options.startAxis;
      }
  
      return this;
    }
  
    if (utils.is.bool(options)) {
      this.options.drag.enabled = options;
  
      if (!options) {
        this.ondragstart = this.ondragstart = this.ondragend = null;
      }
  
      return this;
    }
  
    return this.options.drag;
  };
  
  actions.drag = drag;
  actions.names.push('drag');
  utils.merge(Interactable.eventTypes, ['dragstart', 'dragmove', 'draginertiastart', 'draginertiaresume', 'dragend']);
  actions.methodDict.drag = 'draggable';
  
  defaultOptions.drag = drag.defaults;
  
  module.exports = drag;
  
  },{"../InteractEvent":3,"../Interactable":4,"../Interaction":5,"../defaultOptions":18,"../utils":44,"./base":6}],8:[function(require,module,exports){
  'use strict';
  
  var actions = require('./base');
  var utils = require('../utils');
  var scope = require('../scope');
  /** @lends module:interact */
  var interact = require('../interact');
  var InteractEvent = require('../InteractEvent');
  /** @lends Interactable */
  var Interactable = require('../Interactable');
  var Interaction = require('../Interaction');
  var defaultOptions = require('../defaultOptions');
  
  var drop = {
    defaults: {
      enabled: false,
      accept: null,
      overlap: 'pointer'
    }
  };
  
  var dynamicDrop = false;
  
  Interaction.signals.on('action-start', function (_ref) {
    var interaction = _ref.interaction,
        event = _ref.event;
  
    if (interaction.prepared.name !== 'drag') {
      return;
    }
  
    // reset active dropzones
    interaction.activeDrops.dropzones = [];
    interaction.activeDrops.elements = [];
    interaction.activeDrops.rects = [];
  
    interaction.dropEvents = null;
  
    if (!interaction.dynamicDrop) {
      setActiveDrops(interaction.activeDrops, interaction.element);
    }
  
    var dragEvent = interaction.prevEvent;
    var dropEvents = getDropEvents(interaction, event, dragEvent);
  
    if (dropEvents.activate) {
      fireActiveDrops(interaction.activeDrops, dropEvents.activate);
    }
  });
  
  InteractEvent.signals.on('new', function (_ref2) {
    var interaction = _ref2.interaction,
        iEvent = _ref2.iEvent,
        event = _ref2.event;
  
    if (iEvent.type !== 'dragmove' && iEvent.type !== 'dragend') {
      return;
    }
  
    var draggableElement = interaction.element;
    var dragEvent = iEvent;
    var dropResult = getDrop(dragEvent, event, draggableElement);
  
    interaction.dropTarget = dropResult.dropzone;
    interaction.dropElement = dropResult.element;
  
    interaction.dropEvents = getDropEvents(interaction, event, dragEvent);
  });
  
  Interaction.signals.on('action-move', function (_ref3) {
    var interaction = _ref3.interaction;
  
    if (interaction.prepared.name !== 'drag') {
      return;
    }
  
    fireDropEvents(interaction, interaction.dropEvents);
  });
  
  Interaction.signals.on('action-end', function (_ref4) {
    var interaction = _ref4.interaction;
  
    if (interaction.prepared.name === 'drag') {
      fireDropEvents(interaction, interaction.dropEvents);
    }
  });
  
  Interaction.signals.on('stop-drag', function (_ref5) {
    var interaction = _ref5.interaction;
  
    interaction.activeDrops = {
      dropzones: null,
      elements: null,
      rects: null
    };
  
    interaction.dropEvents = null;
  });
  
  function collectDrops(activeDrops, element) {
    var drops = [];
    var elements = [];
  
    // collect all dropzones and their elements which qualify for a drop
    for (var _i = 0; _i < scope.interactables.length; _i++) {
      var _ref6;
  
      _ref6 = scope.interactables[_i];
      var current = _ref6;
  
      if (!current.options.drop.enabled) {
        continue;
      }
  
      var accept = current.options.drop.accept;
  
      // test the draggable element against the dropzone's accept setting
      if (utils.is.element(accept) && accept !== element || utils.is.string(accept) && !utils.matchesSelector(element, accept)) {
  
        continue;
      }
  
      // query for new elements if necessary
      var dropElements = utils.is.string(current.target) ? current._context.querySelectorAll(current.target) : [current.target];
  
      for (var _i2 = 0; _i2 < dropElements.length; _i2++) {
        var _ref7;
  
        _ref7 = dropElements[_i2];
        var currentElement = _ref7;
  
        if (currentElement !== element) {
          drops.push(current);
          elements.push(currentElement);
        }
      }
    }
  
    return {
      elements: elements,
      dropzones: drops
    };
  }
  
  function fireActiveDrops(activeDrops, event) {
    var prevElement = void 0;
  
    // loop through all active dropzones and trigger event
    for (var i = 0; i < activeDrops.dropzones.length; i++) {
      var current = activeDrops.dropzones[i];
      var currentElement = activeDrops.elements[i];
  
      // prevent trigger of duplicate events on same element
      if (currentElement !== prevElement) {
        // set current element as event target
        event.target = currentElement;
        current.fire(event);
      }
      prevElement = currentElement;
    }
  }
  
  // Collect a new set of possible drops and save them in activeDrops.
  // setActiveDrops should always be called when a drag has just started or a
  // drag event happens while dynamicDrop is true
  function setActiveDrops(activeDrops, dragElement) {
    // get dropzones and their elements that could receive the draggable
    var possibleDrops = collectDrops(activeDrops, dragElement);
  
    activeDrops.dropzones = possibleDrops.dropzones;
    activeDrops.elements = possibleDrops.elements;
    activeDrops.rects = [];
  
    for (var i = 0; i < activeDrops.dropzones.length; i++) {
      activeDrops.rects[i] = activeDrops.dropzones[i].getRect(activeDrops.elements[i]);
    }
  }
  
  function getDrop(dragEvent, event, dragElement) {
    var interaction = dragEvent.interaction;
    var validDrops = [];
  
    if (dynamicDrop) {
      setActiveDrops(interaction.activeDrops, dragElement);
    }
  
    // collect all dropzones and their elements which qualify for a drop
    for (var j = 0; j < interaction.activeDrops.dropzones.length; j++) {
      var current = interaction.activeDrops.dropzones[j];
      var currentElement = interaction.activeDrops.elements[j];
      var rect = interaction.activeDrops.rects[j];
  
      validDrops.push(current.dropCheck(dragEvent, event, interaction.target, dragElement, currentElement, rect) ? currentElement : null);
    }
  
    // get the most appropriate dropzone based on DOM depth and order
    var dropIndex = utils.indexOfDeepestElement(validDrops);
  
    return {
      dropzone: interaction.activeDrops.dropzones[dropIndex] || null,
      element: interaction.activeDrops.elements[dropIndex] || null
    };
  }
  
  function getDropEvents(interaction, pointerEvent, dragEvent) {
    var dropEvents = {
      enter: null,
      leave: null,
      activate: null,
      deactivate: null,
      move: null,
      drop: null
    };
  
    var tmpl = {
      dragEvent: dragEvent,
      interaction: interaction,
      target: interaction.dropElement,
      dropzone: interaction.dropTarget,
      relatedTarget: dragEvent.target,
      draggable: dragEvent.interactable,
      timeStamp: dragEvent.timeStamp
    };
  
    if (interaction.dropElement !== interaction.prevDropElement) {
      // if there was a prevDropTarget, create a dragleave event
      if (interaction.prevDropTarget) {
        dropEvents.leave = utils.extend({ type: 'dragleave' }, tmpl);
  
        dragEvent.dragLeave = dropEvents.leave.target = interaction.prevDropElement;
        dragEvent.prevDropzone = dropEvents.leave.dropzone = interaction.prevDropTarget;
      }
      // if the dropTarget is not null, create a dragenter event
      if (interaction.dropTarget) {
        dropEvents.enter = {
          dragEvent: dragEvent,
          interaction: interaction,
          target: interaction.dropElement,
          dropzone: interaction.dropTarget,
          relatedTarget: dragEvent.target,
          draggable: dragEvent.interactable,
          timeStamp: dragEvent.timeStamp,
          type: 'dragenter'
        };
  
        dragEvent.dragEnter = interaction.dropElement;
        dragEvent.dropzone = interaction.dropTarget;
      }
    }
  
    if (dragEvent.type === 'dragend' && interaction.dropTarget) {
      dropEvents.drop = utils.extend({ type: 'drop' }, tmpl);
  
      dragEvent.dropzone = interaction.dropTarget;
      dragEvent.relatedTarget = interaction.dropElement;
    }
    if (dragEvent.type === 'dragstart') {
      dropEvents.activate = utils.extend({ type: 'dropactivate' }, tmpl);
  
      dropEvents.activate.target = null;
      dropEvents.activate.dropzone = null;
    }
    if (dragEvent.type === 'dragend') {
      dropEvents.deactivate = utils.extend({ type: 'dropdeactivate' }, tmpl);
  
      dropEvents.deactivate.target = null;
      dropEvents.deactivate.dropzone = null;
    }
    if (dragEvent.type === 'dragmove' && interaction.dropTarget) {
      dropEvents.move = utils.extend({
        dragmove: dragEvent,
        type: 'dropmove'
      }, tmpl);
  
      dragEvent.dropzone = interaction.dropTarget;
    }
  
    return dropEvents;
  }
  
  function fireDropEvents(interaction, dropEvents) {
    var activeDrops = interaction.activeDrops,
        prevDropTarget = interaction.prevDropTarget,
        dropTarget = interaction.dropTarget,
        dropElement = interaction.dropElement;
  
  
    if (dropEvents.leave) {
      prevDropTarget.fire(dropEvents.leave);
    }
    if (dropEvents.move) {
      dropTarget.fire(dropEvents.move);
    }
    if (dropEvents.enter) {
      dropTarget.fire(dropEvents.enter);
    }
    if (dropEvents.drop) {
      dropTarget.fire(dropEvents.drop);
    }
    if (dropEvents.deactivate) {
      fireActiveDrops(activeDrops, dropEvents.deactivate);
    }
  
    interaction.prevDropTarget = dropTarget;
    interaction.prevDropElement = dropElement;
  }
  
  /**
   * ```js
   * interact(target)
   * .dropChecker(function(dragEvent,         // related dragmove or dragend event
   *                       event,             // TouchEvent/PointerEvent/MouseEvent
   *                       dropped,           // bool result of the default checker
   *                       dropzone,          // dropzone Interactable
   *                       dropElement,       // dropzone elemnt
   *                       draggable,         // draggable Interactable
   *                       draggableElement) {// draggable element
   *
   *   return dropped && event.target.hasAttribute('allow-drop');
   * }
   * ```
   *
   * ```js
   * interact('.drop').dropzone({
   *   accept: '.can-drop' || document.getElementById('single-drop'),
   *   overlap: 'pointer' || 'center' || zeroToOne
   * }
   * ```
   *
   * Returns or sets whether draggables can be dropped onto this target to
   * trigger drop events
   *
   * Dropzones can receive the following events:
   *  - `dropactivate` and `dropdeactivate` when an acceptable drag starts and ends
   *  - `dragenter` and `dragleave` when a draggable enters and leaves the dropzone
   *  - `dragmove` when a draggable that has entered the dropzone is moved
   *  - `drop` when a draggable is dropped into this dropzone
   *
   * Use the `accept` option to allow only elements that match the given CSS
   * selector or element. The value can be:
   *
   *  - **an Element** - only that element can be dropped into this dropzone.
   *  - **a string**, - the element being dragged must match it as a CSS selector.
   *  - **`null`** - accept options is cleared - it accepts any element.
   *
   * Use the `overlap` option to set how drops are checked for. The allowed
   * values are:
   *
   *   - `'pointer'`, the pointer must be over the dropzone (default)
   *   - `'center'`, the draggable element's center must be over the dropzone
   *   - a number from 0-1 which is the `(intersection area) / (draggable area)`.
   *   e.g. `0.5` for drop to happen when half of the area of the draggable is
   *   over the dropzone
   *
   * Use the `checker` option to specify a function to check if a dragged element
   * is over this Interactable.
   *
   * @param {boolean | object | null} [options] The new options to be set.
   * @return {boolean | Interactable} The current setting or this Interactable
   */
  Interactable.prototype.dropzone = function (options) {
    if (utils.is.object(options)) {
      this.options.drop.enabled = options.enabled === false ? false : true;
  
      if (utils.is.function(options.ondrop)) {
        this.events.ondrop = options.ondrop;
      }
      if (utils.is.function(options.ondropactivate)) {
        this.events.ondropactivate = options.ondropactivate;
      }
      if (utils.is.function(options.ondropdeactivate)) {
        this.events.ondropdeactivate = options.ondropdeactivate;
      }
      if (utils.is.function(options.ondragenter)) {
        this.events.ondragenter = options.ondragenter;
      }
      if (utils.is.function(options.ondragleave)) {
        this.events.ondragleave = options.ondragleave;
      }
      if (utils.is.function(options.ondropmove)) {
        this.events.ondropmove = options.ondropmove;
      }
  
      if (/^(pointer|center)$/.test(options.overlap)) {
        this.options.drop.overlap = options.overlap;
      } else if (utils.is.number(options.overlap)) {
        this.options.drop.overlap = Math.max(Math.min(1, options.overlap), 0);
      }
      if ('accept' in options) {
        this.options.drop.accept = options.accept;
      }
      if ('checker' in options) {
        this.options.drop.checker = options.checker;
      }
  
      return this;
    }
  
    if (utils.is.bool(options)) {
      this.options.drop.enabled = options;
  
      if (!options) {
        this.ondragenter = this.ondragleave = this.ondrop = this.ondropactivate = this.ondropdeactivate = null;
      }
  
      return this;
    }
  
    return this.options.drop;
  };
  
  Interactable.prototype.dropCheck = function (dragEvent, event, draggable, draggableElement, dropElement, rect) {
    var dropped = false;
  
    // if the dropzone has no rect (eg. display: none)
    // call the custom dropChecker or just return false
    if (!(rect = rect || this.getRect(dropElement))) {
      return this.options.drop.checker ? this.options.drop.checker(dragEvent, event, dropped, this, dropElement, draggable, draggableElement) : false;
    }
  
    var dropOverlap = this.options.drop.overlap;
  
    if (dropOverlap === 'pointer') {
      var origin = utils.getOriginXY(draggable, draggableElement, 'drag');
      var page = utils.getPageXY(dragEvent);
  
      page.x += origin.x;
      page.y += origin.y;
  
      var horizontal = page.x > rect.left && page.x < rect.right;
      var vertical = page.y > rect.top && page.y < rect.bottom;
  
      dropped = horizontal && vertical;
    }
  
    var dragRect = draggable.getRect(draggableElement);
  
    if (dragRect && dropOverlap === 'center') {
      var cx = dragRect.left + dragRect.width / 2;
      var cy = dragRect.top + dragRect.height / 2;
  
      dropped = cx >= rect.left && cx <= rect.right && cy >= rect.top && cy <= rect.bottom;
    }
  
    if (dragRect && utils.is.number(dropOverlap)) {
      var overlapArea = Math.max(0, Math.min(rect.right, dragRect.right) - Math.max(rect.left, dragRect.left)) * Math.max(0, Math.min(rect.bottom, dragRect.bottom) - Math.max(rect.top, dragRect.top));
  
      var overlapRatio = overlapArea / (dragRect.width * dragRect.height);
  
      dropped = overlapRatio >= dropOverlap;
    }
  
    if (this.options.drop.checker) {
      dropped = this.options.drop.checker(dragEvent, event, dropped, this, dropElement, draggable, draggableElement);
    }
  
    return dropped;
  };
  
  Interactable.signals.on('unset', function (_ref8) {
    var interactable = _ref8.interactable;
  
    interactable.dropzone(false);
  });
  
  Interactable.settingsMethods.push('dropChecker');
  
  Interaction.signals.on('new', function (interaction) {
    interaction.dropTarget = null; // the dropzone a drag target might be dropped into
    interaction.dropElement = null; // the element at the time of checking
    interaction.prevDropTarget = null; // the dropzone that was recently dragged away from
    interaction.prevDropElement = null; // the element at the time of checking
    interaction.dropEvents = null; // the dropEvents related to the current drag event
  
    interaction.activeDrops = {
      dropzones: [], // the dropzones that are mentioned below
      elements: [], // elements of dropzones that accept the target draggable
      rects: [] // the rects of the elements mentioned above
    };
  });
  
  Interaction.signals.on('stop', function (_ref9) {
    var interaction = _ref9.interaction;
  
    interaction.dropTarget = interaction.dropElement = interaction.prevDropTarget = interaction.prevDropElement = null;
  });
  
  /**
   * Returns or sets whether the dimensions of dropzone elements are calculated
   * on every dragmove or only on dragstart for the default dropChecker
   *
   * @param {boolean} [newValue] True to check on each move. False to check only
   * before start
   * @return {boolean | interact} The current setting or interact
   */
  interact.dynamicDrop = function (newValue) {
    if (utils.is.bool(newValue)) {
      //if (dragging && dynamicDrop !== newValue && !newValue) {
      //calcRects(dropzones);
      //}
  
      dynamicDrop = newValue;
  
      return interact;
    }
    return dynamicDrop;
  };
  
  utils.merge(Interactable.eventTypes, ['dragenter', 'dragleave', 'dropactivate', 'dropdeactivate', 'dropmove', 'drop']);
  actions.methodDict.drop = 'dropzone';
  
  defaultOptions.drop = drop.defaults;
  
  module.exports = drop;
  
  },{"../InteractEvent":3,"../Interactable":4,"../Interaction":5,"../defaultOptions":18,"../interact":21,"../scope":33,"../utils":44,"./base":6}],9:[function(require,module,exports){
  'use strict';
  
  var actions = require('./base');
  var utils = require('../utils');
  var InteractEvent = require('../InteractEvent');
  var Interactable = require('../Interactable');
  var Interaction = require('../Interaction');
  var defaultOptions = require('../defaultOptions');
  
  var gesture = {
    defaults: {
      enabled: false,
      origin: null,
      restrict: null
    },
  
    checker: function checker(pointer, event, interactable, element, interaction) {
      if (interaction.pointerIds.length >= 2) {
        return { name: 'gesture' };
      }
  
      return null;
    },
  
    getCursor: function getCursor() {
      return '';
    }
  };
  
  InteractEvent.signals.on('new', function (_ref) {
    var iEvent = _ref.iEvent,
        interaction = _ref.interaction;
  
    if (iEvent.type !== 'gesturestart') {
      return;
    }
    iEvent.ds = 0;
  
    interaction.gesture.startDistance = interaction.gesture.prevDistance = iEvent.distance;
    interaction.gesture.startAngle = interaction.gesture.prevAngle = iEvent.angle;
    interaction.gesture.scale = 1;
  });
  
  InteractEvent.signals.on('new', function (_ref2) {
    var iEvent = _ref2.iEvent,
        interaction = _ref2.interaction;
  
    if (iEvent.type !== 'gesturemove') {
      return;
    }
  
    iEvent.ds = iEvent.scale - interaction.gesture.scale;
  
    interaction.target.fire(iEvent);
  
    interaction.gesture.prevAngle = iEvent.angle;
    interaction.gesture.prevDistance = iEvent.distance;
  
    if (iEvent.scale !== Infinity && iEvent.scale !== null && iEvent.scale !== undefined && !isNaN(iEvent.scale)) {
  
      interaction.gesture.scale = iEvent.scale;
    }
  });
  
  /**
   * ```js
   * interact(element).gesturable({
   *     onstart: function (event) {},
   *     onmove : function (event) {},
   *     onend  : function (event) {},
   *
   *     // limit multiple gestures.
   *     // See the explanation in {@link Interactable.draggable} example
   *     max: Infinity,
   *     maxPerElement: 1,
   * });
   *
   * var isGestureable = interact(element).gesturable();
   * ```
   *
   * Gets or sets whether multitouch gestures can be performed on the target
   *
   * @param {boolean | object} [options] true/false or An object with event
   * listeners to be fired on gesture events (makes the Interactable gesturable)
   * @return {boolean | Interactable} A boolean indicating if this can be the
   * target of gesture events, or this Interactable
   */
  Interactable.prototype.gesturable = function (options) {
    if (utils.is.object(options)) {
      this.options.gesture.enabled = options.enabled === false ? false : true;
      this.setPerAction('gesture', options);
      this.setOnEvents('gesture', options);
  
      return this;
    }
  
    if (utils.is.bool(options)) {
      this.options.gesture.enabled = options;
  
      if (!options) {
        this.ongesturestart = this.ongesturestart = this.ongestureend = null;
      }
  
      return this;
    }
  
    return this.options.gesture;
  };
  
  InteractEvent.signals.on('set-delta', function (_ref3) {
    var interaction = _ref3.interaction,
        iEvent = _ref3.iEvent,
        action = _ref3.action,
        event = _ref3.event,
        starting = _ref3.starting,
        ending = _ref3.ending,
        deltaSource = _ref3.deltaSource;
  
    if (action !== 'gesture') {
      return;
    }
  
    var pointers = interaction.pointers;
  
    iEvent.touches = [pointers[0], pointers[1]];
  
    if (starting) {
      iEvent.distance = utils.touchDistance(pointers, deltaSource);
      iEvent.box = utils.touchBBox(pointers);
      iEvent.scale = 1;
      iEvent.ds = 0;
      iEvent.angle = utils.touchAngle(pointers, undefined, deltaSource);
      iEvent.da = 0;
    } else if (ending || event instanceof InteractEvent) {
      iEvent.distance = interaction.prevEvent.distance;
      iEvent.box = interaction.prevEvent.box;
      iEvent.scale = interaction.prevEvent.scale;
      iEvent.ds = iEvent.scale - 1;
      iEvent.angle = interaction.prevEvent.angle;
      iEvent.da = iEvent.angle - interaction.gesture.startAngle;
    } else {
      iEvent.distance = utils.touchDistance(pointers, deltaSource);
      iEvent.box = utils.touchBBox(pointers);
      iEvent.scale = iEvent.distance / interaction.gesture.startDistance;
      iEvent.angle = utils.touchAngle(pointers, interaction.gesture.prevAngle, deltaSource);
  
      iEvent.ds = iEvent.scale - interaction.gesture.prevScale;
      iEvent.da = iEvent.angle - interaction.gesture.prevAngle;
    }
  });
  
  Interaction.signals.on('new', function (interaction) {
    interaction.gesture = {
      start: { x: 0, y: 0 },
  
      startDistance: 0, // distance between two touches of touchStart
      prevDistance: 0,
      distance: 0,
  
      scale: 1, // gesture.distance / gesture.startDistance
  
      startAngle: 0, // angle of line joining two touches
      prevAngle: 0 // angle of the previous gesture event
    };
  });
  
  actions.gesture = gesture;
  actions.names.push('gesture');
  utils.merge(Interactable.eventTypes, ['gesturestart', 'gesturemove', 'gestureend']);
  actions.methodDict.gesture = 'gesturable';
  
  defaultOptions.gesture = gesture.defaults;
  
  module.exports = gesture;
  
  },{"../InteractEvent":3,"../Interactable":4,"../Interaction":5,"../defaultOptions":18,"../utils":44,"./base":6}],10:[function(require,module,exports){
  'use strict';
  
  var actions = require('./base');
  var utils = require('../utils');
  var browser = require('../utils/browser');
  var InteractEvent = require('../InteractEvent');
  /** @lends Interactable */
  var Interactable = require('../Interactable');
  var Interaction = require('../Interaction');
  var defaultOptions = require('../defaultOptions');
  
  // Less Precision with touch input
  var defaultMargin = browser.supportsTouch || browser.supportsPointerEvent ? 20 : 10;
  
  var resize = {
    defaults: {
      enabled: false,
      mouseButtons: null,
  
      origin: null,
      snap: null,
      restrict: null,
      inertia: null,
      autoScroll: null,
  
      square: false,
      preserveAspectRatio: false,
      axis: 'xy',
  
      // use default margin
      margin: NaN,
  
      // object with props left, right, top, bottom which are
      // true/false values to resize when the pointer is over that edge,
      // CSS selectors to match the handles for each direction
      // or the Elements for each handle
      edges: null,
  
      // a value of 'none' will limit the resize rect to a minimum of 0x0
      // 'negate' will alow the rect to have negative width/height
      // 'reposition' will keep the width/height positive by swapping
      // the top and bottom edges and/or swapping the left and right edges
      invert: 'none'
    },
  
    checker: function checker(pointer, event, interactable, element, interaction, rect) {
      if (!rect) {
        return null;
      }
  
      var page = utils.extend({}, interaction.curCoords.page);
      var options = interactable.options;
  
      if (options.resize.enabled) {
        var resizeOptions = options.resize;
        var resizeEdges = { left: false, right: false, top: false, bottom: false };
  
        // if using resize.edges
        if (utils.is.object(resizeOptions.edges)) {
          for (var edge in resizeEdges) {
            resizeEdges[edge] = checkResizeEdge(edge, resizeOptions.edges[edge], page, interaction._eventTarget, element, rect, resizeOptions.margin || defaultMargin);
          }
  
          resizeEdges.left = resizeEdges.left && !resizeEdges.right;
          resizeEdges.top = resizeEdges.top && !resizeEdges.bottom;
  
          if (resizeEdges.left || resizeEdges.right || resizeEdges.top || resizeEdges.bottom) {
            return {
              name: 'resize',
              edges: resizeEdges
            };
          }
        } else {
          var right = options.resize.axis !== 'y' && page.x > rect.right - defaultMargin;
          var bottom = options.resize.axis !== 'x' && page.y > rect.bottom - defaultMargin;
  
          if (right || bottom) {
            return {
              name: 'resize',
              axes: (right ? 'x' : '') + (bottom ? 'y' : '')
            };
          }
        }
      }
  
      return null;
    },
  
    cursors: browser.isIe9 ? {
      x: 'e-resize',
      y: 's-resize',
      xy: 'se-resize',
  
      top: 'n-resize',
      left: 'w-resize',
      bottom: 's-resize',
      right: 'e-resize',
      topleft: 'se-resize',
      bottomright: 'se-resize',
      topright: 'ne-resize',
      bottomleft: 'ne-resize'
    } : {
      x: 'ew-resize',
      y: 'ns-resize',
      xy: 'nwse-resize',
  
      top: 'ns-resize',
      left: 'ew-resize',
      bottom: 'ns-resize',
      right: 'ew-resize',
      topleft: 'nwse-resize',
      bottomright: 'nwse-resize',
      topright: 'nesw-resize',
      bottomleft: 'nesw-resize'
    },
  
    getCursor: function getCursor(action) {
      if (action.axis) {
        return resize.cursors[action.name + action.axis];
      } else if (action.edges) {
        var cursorKey = '';
        var edgeNames = ['top', 'bottom', 'left', 'right'];
  
        for (var i = 0; i < 4; i++) {
          if (action.edges[edgeNames[i]]) {
            cursorKey += edgeNames[i];
          }
        }
  
        return resize.cursors[cursorKey];
      }
    }
  };
  
  // resizestart
  InteractEvent.signals.on('new', function (_ref) {
    var iEvent = _ref.iEvent,
        interaction = _ref.interaction;
  
    if (iEvent.type !== 'resizestart' || !interaction.prepared.edges) {
      return;
    }
  
    var startRect = interaction.target.getRect(interaction.element);
    var resizeOptions = interaction.target.options.resize;
  
    /*
     * When using the `resizable.square` or `resizable.preserveAspectRatio` options, resizing from one edge
     * will affect another. E.g. with `resizable.square`, resizing to make the right edge larger will make
     * the bottom edge larger by the same amount. We call these 'linked' edges. Any linked edges will depend
     * on the active edges and the edge being interacted with.
     */
    if (resizeOptions.square || resizeOptions.preserveAspectRatio) {
      var linkedEdges = utils.extend({}, interaction.prepared.edges);
  
      linkedEdges.top = linkedEdges.top || linkedEdges.left && !linkedEdges.bottom;
      linkedEdges.left = linkedEdges.left || linkedEdges.top && !linkedEdges.right;
      linkedEdges.bottom = linkedEdges.bottom || linkedEdges.right && !linkedEdges.top;
      linkedEdges.right = linkedEdges.right || linkedEdges.bottom && !linkedEdges.left;
  
      interaction.prepared._linkedEdges = linkedEdges;
    } else {
      interaction.prepared._linkedEdges = null;
    }
  
    // if using `resizable.preserveAspectRatio` option, record aspect ratio at the start of the resize
    if (resizeOptions.preserveAspectRatio) {
      interaction.resizeStartAspectRatio = startRect.width / startRect.height;
    }
  
    interaction.resizeRects = {
      start: startRect,
      current: utils.extend({}, startRect),
      inverted: utils.extend({}, startRect),
      previous: utils.extend({}, startRect),
      delta: {
        left: 0, right: 0, width: 0,
        top: 0, bottom: 0, height: 0
      }
    };
  
    iEvent.rect = interaction.resizeRects.inverted;
    iEvent.deltaRect = interaction.resizeRects.delta;
  });
  
  // resizemove
  InteractEvent.signals.on('new', function (_ref2) {
    var iEvent = _ref2.iEvent,
        phase = _ref2.phase,
        interaction = _ref2.interaction;
  
    if (phase !== 'move' || !interaction.prepared.edges) {
      return;
    }
  
    var resizeOptions = interaction.target.options.resize;
    var invert = resizeOptions.invert;
    var invertible = invert === 'reposition' || invert === 'negate';
  
    var edges = interaction.prepared.edges;
  
    var start = interaction.resizeRects.start;
    var current = interaction.resizeRects.current;
    var inverted = interaction.resizeRects.inverted;
    var delta = interaction.resizeRects.delta;
    var previous = utils.extend(interaction.resizeRects.previous, inverted);
    var originalEdges = edges;
  
    var dx = iEvent.dx;
    var dy = iEvent.dy;
  
    if (resizeOptions.preserveAspectRatio || resizeOptions.square) {
      // `resize.preserveAspectRatio` takes precedence over `resize.square`
      var startAspectRatio = resizeOptions.preserveAspectRatio ? interaction.resizeStartAspectRatio : 1;
  
      edges = interaction.prepared._linkedEdges;
  
      if (originalEdges.left && originalEdges.bottom || originalEdges.right && originalEdges.top) {
        dy = -dx / startAspectRatio;
      } else if (originalEdges.left || originalEdges.right) {
        dy = dx / startAspectRatio;
      } else if (originalEdges.top || originalEdges.bottom) {
        dx = dy * startAspectRatio;
      }
    }
  
    // update the 'current' rect without modifications
    if (edges.top) {
      current.top += dy;
    }
    if (edges.bottom) {
      current.bottom += dy;
    }
    if (edges.left) {
      current.left += dx;
    }
    if (edges.right) {
      current.right += dx;
    }
  
    if (invertible) {
      // if invertible, copy the current rect
      utils.extend(inverted, current);
  
      if (invert === 'reposition') {
        // swap edge values if necessary to keep width/height positive
        var swap = void 0;
  
        if (inverted.top > inverted.bottom) {
          swap = inverted.top;
  
          inverted.top = inverted.bottom;
          inverted.bottom = swap;
        }
        if (inverted.left > inverted.right) {
          swap = inverted.left;
  
          inverted.left = inverted.right;
          inverted.right = swap;
        }
      }
    } else {
      // if not invertible, restrict to minimum of 0x0 rect
      inverted.top = Math.min(current.top, start.bottom);
      inverted.bottom = Math.max(current.bottom, start.top);
      inverted.left = Math.min(current.left, start.right);
      inverted.right = Math.max(current.right, start.left);
    }
  
    inverted.width = inverted.right - inverted.left;
    inverted.height = inverted.bottom - inverted.top;
  
    for (var edge in inverted) {
      delta[edge] = inverted[edge] - previous[edge];
    }
  
    iEvent.edges = interaction.prepared.edges;
    iEvent.rect = inverted;
    iEvent.deltaRect = delta;
  });
  
  /**
   * ```js
   * interact(element).resizable({
   *   onstart: function (event) {},
   *   onmove : function (event) {},
   *   onend  : function (event) {},
   *
   *   edges: {
   *     top   : true,       // Use pointer coords to check for resize.
   *     left  : false,      // Disable resizing from left edge.
   *     bottom: '.resize-s',// Resize if pointer target matches selector
   *     right : handleEl    // Resize if pointer target is the given Element
   *   },
   *
   *     // Width and height can be adjusted independently. When `true`, width and
   *     // height are adjusted at a 1:1 ratio.
   *     square: false,
   *
   *     // Width and height can be adjusted independently. When `true`, width and
   *     // height maintain the aspect ratio they had when resizing started.
   *     preserveAspectRatio: false,
   *
   *   // a value of 'none' will limit the resize rect to a minimum of 0x0
   *   // 'negate' will allow the rect to have negative width/height
   *   // 'reposition' will keep the width/height positive by swapping
   *   // the top and bottom edges and/or swapping the left and right edges
   *   invert: 'none' || 'negate' || 'reposition'
   *
   *   // limit multiple resizes.
   *   // See the explanation in the {@link Interactable.draggable} example
   *   max: Infinity,
   *   maxPerElement: 1,
   * });
   *
   * var isResizeable = interact(element).resizable();
   * ```
   *
   * Gets or sets whether resize actions can be performed on the target
   *
   * @param {boolean | object} [options] true/false or An object with event
   * listeners to be fired on resize events (object makes the Interactable
   * resizable)
   * @return {boolean | Interactable} A boolean indicating if this can be the
   * target of resize elements, or this Interactable
   */
  Interactable.prototype.resizable = function (options) {
    if (utils.is.object(options)) {
      this.options.resize.enabled = options.enabled === false ? false : true;
      this.setPerAction('resize', options);
      this.setOnEvents('resize', options);
  
      if (/^x$|^y$|^xy$/.test(options.axis)) {
        this.options.resize.axis = options.axis;
      } else if (options.axis === null) {
        this.options.resize.axis = defaultOptions.resize.axis;
      }
  
      if (utils.is.bool(options.preserveAspectRatio)) {
        this.options.resize.preserveAspectRatio = options.preserveAspectRatio;
      } else if (utils.is.bool(options.square)) {
        this.options.resize.square = options.square;
      }
  
      return this;
    }
    if (utils.is.bool(options)) {
      this.options.resize.enabled = options;
  
      if (!options) {
        this.onresizestart = this.onresizestart = this.onresizeend = null;
      }
  
      return this;
    }
    return this.options.resize;
  };
  
  function checkResizeEdge(name, value, page, element, interactableElement, rect, margin) {
    // false, '', undefined, null
    if (!value) {
      return false;
    }
  
    // true value, use pointer coords and element rect
    if (value === true) {
      // if dimensions are negative, "switch" edges
      var width = utils.is.number(rect.width) ? rect.width : rect.right - rect.left;
      var height = utils.is.number(rect.height) ? rect.height : rect.bottom - rect.top;
  
      if (width < 0) {
        if (name === 'left') {
          name = 'right';
        } else if (name === 'right') {
          name = 'left';
        }
      }
      if (height < 0) {
        if (name === 'top') {
          name = 'bottom';
        } else if (name === 'bottom') {
          name = 'top';
        }
      }
  
      if (name === 'left') {
        return page.x < (width >= 0 ? rect.left : rect.right) + margin;
      }
      if (name === 'top') {
        return page.y < (height >= 0 ? rect.top : rect.bottom) + margin;
      }
  
      if (name === 'right') {
        return page.x > (width >= 0 ? rect.right : rect.left) - margin;
      }
      if (name === 'bottom') {
        return page.y > (height >= 0 ? rect.bottom : rect.top) - margin;
      }
    }
  
    // the remaining checks require an element
    if (!utils.is.element(element)) {
      return false;
    }
  
    return utils.is.element(value)
    // the value is an element to use as a resize handle
    ? value === element
    // otherwise check if element matches value as selector
    : utils.matchesUpTo(element, value, interactableElement);
  }
  
  Interaction.signals.on('new', function (interaction) {
    interaction.resizeAxes = 'xy';
  });
  
  InteractEvent.signals.on('set-delta', function (_ref3) {
    var interaction = _ref3.interaction,
        iEvent = _ref3.iEvent,
        action = _ref3.action;
  
    if (action !== 'resize' || !interaction.resizeAxes) {
      return;
    }
  
    var options = interaction.target.options;
  
    if (options.resize.square) {
      if (interaction.resizeAxes === 'y') {
        iEvent.dx = iEvent.dy;
      } else {
        iEvent.dy = iEvent.dx;
      }
      iEvent.axes = 'xy';
    } else {
      iEvent.axes = interaction.resizeAxes;
  
      if (interaction.resizeAxes === 'x') {
        iEvent.dy = 0;
      } else if (interaction.resizeAxes === 'y') {
        iEvent.dx = 0;
      }
    }
  });
  
  actions.resize = resize;
  actions.names.push('resize');
  utils.merge(Interactable.eventTypes, ['resizestart', 'resizemove', 'resizeinertiastart', 'resizeinertiaresume', 'resizeend']);
  actions.methodDict.resize = 'resizable';
  
  defaultOptions.resize = resize.defaults;
  
  module.exports = resize;
  
  },{"../InteractEvent":3,"../Interactable":4,"../Interaction":5,"../defaultOptions":18,"../utils":44,"../utils/browser":36,"./base":6}],11:[function(require,module,exports){
  'use strict';
  
  var raf = require('./utils/raf');
  var getWindow = require('./utils/window').getWindow;
  var is = require('./utils/is');
  var domUtils = require('./utils/domUtils');
  var Interaction = require('./Interaction');
  var defaultOptions = require('./defaultOptions');
  
  var autoScroll = {
    defaults: {
      enabled: false,
      container: null, // the item that is scrolled (Window or HTMLElement)
      margin: 60,
      speed: 300 // the scroll speed in pixels per second
    },
  
    interaction: null,
    i: null, // the handle returned by window.setInterval
    x: 0, y: 0, // Direction each pulse is to scroll in
  
    isScrolling: false,
    prevTime: 0,
  
    start: function start(interaction) {
      autoScroll.isScrolling = true;
      raf.cancel(autoScroll.i);
  
      autoScroll.interaction = interaction;
      autoScroll.prevTime = new Date().getTime();
      autoScroll.i = raf.request(autoScroll.scroll);
    },
  
    stop: function stop() {
      autoScroll.isScrolling = false;
      raf.cancel(autoScroll.i);
    },
  
    // scroll the window by the values in scroll.x/y
    scroll: function scroll() {
      var options = autoScroll.interaction.target.options[autoScroll.interaction.prepared.name].autoScroll;
      var container = options.container || getWindow(autoScroll.interaction.element);
      var now = new Date().getTime();
      // change in time in seconds
      var dt = (now - autoScroll.prevTime) / 1000;
      // displacement
      var s = options.speed * dt;
  
      if (s >= 1) {
        if (is.window(container)) {
          container.scrollBy(autoScroll.x * s, autoScroll.y * s);
        } else if (container) {
          container.scrollLeft += autoScroll.x * s;
          container.scrollTop += autoScroll.y * s;
        }
  
        autoScroll.prevTime = now;
      }
  
      if (autoScroll.isScrolling) {
        raf.cancel(autoScroll.i);
        autoScroll.i = raf.request(autoScroll.scroll);
      }
    },
    check: function check(interactable, actionName) {
      var options = interactable.options;
  
      return options[actionName].autoScroll && options[actionName].autoScroll.enabled;
    },
    onInteractionMove: function onInteractionMove(_ref) {
      var interaction = _ref.interaction,
          pointer = _ref.pointer;
  
      if (!(interaction.interacting() && autoScroll.check(interaction.target, interaction.prepared.name))) {
        return;
      }
  
      if (interaction.simulation) {
        autoScroll.x = autoScroll.y = 0;
        return;
      }
  
      var top = void 0;
      var right = void 0;
      var bottom = void 0;
      var left = void 0;
  
      var options = interaction.target.options[interaction.prepared.name].autoScroll;
      var container = options.container || getWindow(interaction.element);
  
      if (is.window(container)) {
        left = pointer.clientX < autoScroll.margin;
        top = pointer.clientY < autoScroll.margin;
        right = pointer.clientX > container.innerWidth - autoScroll.margin;
        bottom = pointer.clientY > container.innerHeight - autoScroll.margin;
      } else {
        var rect = domUtils.getElementClientRect(container);
  
        left = pointer.clientX < rect.left + autoScroll.margin;
        top = pointer.clientY < rect.top + autoScroll.margin;
        right = pointer.clientX > rect.right - autoScroll.margin;
        bottom = pointer.clientY > rect.bottom - autoScroll.margin;
      }
  
      autoScroll.x = right ? 1 : left ? -1 : 0;
      autoScroll.y = bottom ? 1 : top ? -1 : 0;
  
      if (!autoScroll.isScrolling) {
        // set the autoScroll properties to those of the target
        autoScroll.margin = options.margin;
        autoScroll.speed = options.speed;
  
        autoScroll.start(interaction);
      }
    }
  };
  
  Interaction.signals.on('stop-active', function () {
    autoScroll.stop();
  });
  
  Interaction.signals.on('action-move', autoScroll.onInteractionMove);
  
  defaultOptions.perAction.autoScroll = autoScroll.defaults;
  
  module.exports = autoScroll;
  
  },{"./Interaction":5,"./defaultOptions":18,"./utils/domUtils":39,"./utils/is":46,"./utils/raf":50,"./utils/window":52}],12:[function(require,module,exports){
  'use strict';
  
  /** @lends Interactable */
  var Interactable = require('../Interactable');
  var actions = require('../actions/base');
  var is = require('../utils/is');
  var domUtils = require('../utils/domUtils');
  
  var _require = require('../utils'),
      warnOnce = _require.warnOnce;
  
  Interactable.prototype.getAction = function (pointer, event, interaction, element) {
    var action = this.defaultActionChecker(pointer, event, interaction, element);
  
    if (this.options.actionChecker) {
      return this.options.actionChecker(pointer, event, action, this, element, interaction);
    }
  
    return action;
  };
  
  /**
   * ```js
   * interact(element, { ignoreFrom: document.getElementById('no-action') });
   * // or
   * interact(element).ignoreFrom('input, textarea, a');
   * ```
   * @deprecated
   * If the target of the `mousedown`, `pointerdown` or `touchstart` event or any
   * of it's parents match the given CSS selector or Element, no
   * drag/resize/gesture is started.
   *
   * Don't use this method. Instead set the `ignoreFrom` option for each action
   * or for `pointerEvents`
   *
   * @example
   * interact(targett)
   *   .draggable({
   *     ignoreFrom: 'input, textarea, a[href]'',
   *   })
   *   .pointerEvents({
   *     ignoreFrom: '[no-pointer]',
   *   });
   *
   * @param {string | Element | null} [newValue] a CSS selector string, an
   * Element or `null` to not ignore any elements
   * @return {string | Element | object} The current ignoreFrom value or this
   * Interactable
   */
  Interactable.prototype.ignoreFrom = warnOnce(function (newValue) {
    return this._backCompatOption('ignoreFrom', newValue);
  }, 'Interactable.ignoreForm() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue}).');
  
  /**
   * ```js
   *
   * @deprecated
   * A drag/resize/gesture is started only If the target of the `mousedown`,
   * `pointerdown` or `touchstart` event or any of it's parents match the given
   * CSS selector or Element.
   *
   * Don't use this method. Instead set the `allowFrom` option for each action
   * or for `pointerEvents`
   *
   * @example
   * interact(targett)
   *   .resizable({
   *     allowFrom: '.resize-handle',
   *   .pointerEvents({
   *     allowFrom: '.handle',,
   *   });
   *
   * @param {string | Element | null} [newValue] a CSS selector string, an
   * Element or `null` to allow from any element
   * @return {string | Element | object} The current allowFrom value or this
   * Interactable
   */
  Interactable.prototype.allowFrom = warnOnce(function (newValue) {
    return this._backCompatOption('allowFrom', newValue);
  }, 'Interactable.allowForm() has been deprecated. Use Interactble.draggable({allowFrom: newValue}).');
  
  Interactable.prototype.testIgnore = function (ignoreFrom, interactableElement, element) {
    if (!ignoreFrom || !is.element(element)) {
      return false;
    }
  
    if (is.string(ignoreFrom)) {
      return domUtils.matchesUpTo(element, ignoreFrom, interactableElement);
    } else if (is.element(ignoreFrom)) {
      return domUtils.nodeContains(ignoreFrom, element);
    }
  
    return false;
  };
  
  Interactable.prototype.testAllow = function (allowFrom, interactableElement, element) {
    if (!allowFrom) {
      return true;
    }
  
    if (!is.element(element)) {
      return false;
    }
  
    if (is.string(allowFrom)) {
      return domUtils.matchesUpTo(element, allowFrom, interactableElement);
    } else if (is.element(allowFrom)) {
      return domUtils.nodeContains(allowFrom, element);
    }
  
    return false;
  };
  
  Interactable.prototype.testIgnoreAllow = function (options, interactableElement, eventTarget) {
    return !this.testIgnore(options.ignoreFrom, interactableElement, eventTarget) && this.testAllow(options.allowFrom, interactableElement, eventTarget);
  };
  
  /**
   * ```js
   * interact('.resize-drag')
   *   .resizable(true)
   *   .draggable(true)
   *   .actionChecker(function (pointer, event, action, interactable, element, interaction) {
   *
   *   if (interact.matchesSelector(event.target, '.drag-handle') {
   *     // force drag with handle target
   *     action.name = drag;
   *   }
   *   else {
   *     // resize from the top and right edges
   *     action.name  = 'resize';
   *     action.edges = { top: true, right: true };
   *   }
   *
   *   return action;
   * });
   * ```
   *
   * Gets or sets the function used to check action to be performed on
   * pointerDown
   *
   * @param {function | null} [checker] A function which takes a pointer event,
   * defaultAction string, interactable, element and interaction as parameters
   * and returns an object with name property 'drag' 'resize' or 'gesture' and
   * optionally an `edges` object with boolean 'top', 'left', 'bottom' and right
   * props.
   * @return {Function | Interactable} The checker function or this Interactable
   */
  Interactable.prototype.actionChecker = function (checker) {
    if (is.function(checker)) {
      this.options.actionChecker = checker;
  
      return this;
    }
  
    if (checker === null) {
      delete this.options.actionChecker;
  
      return this;
    }
  
    return this.options.actionChecker;
  };
  
  /**
   * Returns or sets whether the the cursor should be changed depending on the
   * action that would be performed if the mouse were pressed and dragged.
   *
   * @param {boolean} [newValue]
   * @return {boolean | Interactable} The current setting or this Interactable
   */
  Interactable.prototype.styleCursor = function (newValue) {
    if (is.bool(newValue)) {
      this.options.styleCursor = newValue;
  
      return this;
    }
  
    if (newValue === null) {
      delete this.options.styleCursor;
  
      return this;
    }
  
    return this.options.styleCursor;
  };
  
  Interactable.prototype.defaultActionChecker = function (pointer, event, interaction, element) {
    var rect = this.getRect(element);
    var buttons = event.buttons || {
      0: 1,
      1: 4,
      3: 8,
      4: 16
    }[event.button];
    var action = null;
  
    for (var _i = 0; _i < actions.names.length; _i++) {
      var _ref;
  
      _ref = actions.names[_i];
      var actionName = _ref;
  
      // check mouseButton setting if the pointer is down
      if (interaction.pointerIsDown && /mouse|pointer/.test(interaction.pointerType) && (buttons & this.options[actionName].mouseButtons) === 0) {
        continue;
      }
  
      action = actions[actionName].checker(pointer, event, this, element, interaction, rect);
  
      if (action) {
        return action;
      }
    }
  };
  
  },{"../Interactable":4,"../actions/base":6,"../utils":44,"../utils/domUtils":39,"../utils/is":46}],13:[function(require,module,exports){
  'use strict';
  
  var interact = require('../interact');
  var Interactable = require('../Interactable');
  var Interaction = require('../Interaction');
  var actions = require('../actions/base');
  var defaultOptions = require('../defaultOptions');
  var scope = require('../scope');
  var utils = require('../utils');
  var signals = require('../utils/Signals').new();
  
  require('./InteractableMethods');
  
  var autoStart = {
    signals: signals,
    withinInteractionLimit: withinInteractionLimit,
    // Allow this many interactions to happen simultaneously
    maxInteractions: Infinity,
    defaults: {
      perAction: {
        manualStart: false,
        max: Infinity,
        maxPerElement: 1,
        allowFrom: null,
        ignoreFrom: null,
  
        // only allow left button by default
        // see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons#Return_value
        mouseButtons: 1
      }
    },
    setActionDefaults: function setActionDefaults(action) {
      utils.extend(action.defaults, autoStart.defaults.perAction);
    },
    validateAction: validateAction
  };
  
  // set cursor style on mousedown
  Interaction.signals.on('down', function (_ref) {
    var interaction = _ref.interaction,
        pointer = _ref.pointer,
        event = _ref.event,
        eventTarget = _ref.eventTarget;
  
    if (interaction.interacting()) {
      return;
    }
  
    var actionInfo = getActionInfo(interaction, pointer, event, eventTarget);
    prepare(interaction, actionInfo);
  });
  
  // set cursor style on mousemove
  Interaction.signals.on('move', function (_ref2) {
    var interaction = _ref2.interaction,
        pointer = _ref2.pointer,
        event = _ref2.event,
        eventTarget = _ref2.eventTarget;
  
    if (interaction.pointerType !== 'mouse' || interaction.pointerIsDown || interaction.interacting()) {
      return;
    }
  
    var actionInfo = getActionInfo(interaction, pointer, event, eventTarget);
    prepare(interaction, actionInfo);
  });
  
  Interaction.signals.on('move', function (arg) {
    var interaction = arg.interaction,
        event = arg.event;
  
  
    if (!interaction.pointerIsDown || interaction.interacting() || !interaction.pointerWasMoved || !interaction.prepared.name) {
      return;
    }
  
    signals.fire('before-start', arg);
  
    var target = interaction.target;
  
    if (interaction.prepared.name && target) {
      // check manualStart and interaction limit
      if (target.options[interaction.prepared.name].manualStart || !withinInteractionLimit(target, interaction.element, interaction.prepared)) {
        interaction.stop(event);
      } else {
        interaction.start(interaction.prepared, target, interaction.element);
      }
    }
  });
  
  // Check if the current target supports the action.
  // If so, return the validated action. Otherwise, return null
  function validateAction(action, interactable, element, eventTarget) {
    if (utils.is.object(action) && interactable.testIgnoreAllow(interactable.options[action.name], element, eventTarget) && interactable.options[action.name].enabled && withinInteractionLimit(interactable, element, action)) {
      return action;
    }
  
    return null;
  }
  
  function validateSelector(interaction, pointer, event, matches, matchElements, eventTarget) {
    for (var i = 0, len = matches.length; i < len; i++) {
      var match = matches[i];
      var matchElement = matchElements[i];
      var action = validateAction(match.getAction(pointer, event, interaction, matchElement), match, matchElement, eventTarget);
  
      if (action) {
        return {
          action: action,
          target: match,
          element: matchElement
        };
      }
    }
  
    return {};
  }
  
  function getActionInfo(interaction, pointer, event, eventTarget) {
    var matches = [];
    var matchElements = [];
  
    var element = eventTarget;
  
    function pushMatches(interactable) {
      matches.push(interactable);
      matchElements.push(element);
    }
  
    while (utils.is.element(element)) {
      matches = [];
      matchElements = [];
  
      scope.interactables.forEachMatch(element, pushMatches);
  
      var actionInfo = validateSelector(interaction, pointer, event, matches, matchElements, eventTarget);
  
      if (actionInfo.action && !actionInfo.target.options[actionInfo.action.name].manualStart) {
        return actionInfo;
      }
  
      element = utils.parentNode(element);
    }
  
    return {};
  }
  
  function prepare(interaction, _ref3) {
    var action = _ref3.action,
        target = _ref3.target,
        element = _ref3.element;
  
    action = action || {};
  
    if (interaction.target && interaction.target.options.styleCursor) {
      interaction.target._doc.documentElement.style.cursor = '';
    }
  
    interaction.target = target;
    interaction.element = element;
    utils.copyAction(interaction.prepared, action);
  
    if (target && target.options.styleCursor) {
      var cursor = action ? actions[action.name].getCursor(action) : '';
      interaction.target._doc.documentElement.style.cursor = cursor;
    }
  
    signals.fire('prepared', { interaction: interaction });
  }
  
  Interaction.signals.on('stop', function (_ref4) {
    var interaction = _ref4.interaction;
  
    var target = interaction.target;
  
    if (target && target.options.styleCursor) {
      target._doc.documentElement.style.cursor = '';
    }
  });
  
  function withinInteractionLimit(interactable, element, action) {
    var options = interactable.options;
    var maxActions = options[action.name].max;
    var maxPerElement = options[action.name].maxPerElement;
    var activeInteractions = 0;
    var targetCount = 0;
    var targetElementCount = 0;
  
    // no actions if any of these values == 0
    if (!(maxActions && maxPerElement && autoStart.maxInteractions)) {
      return;
    }
  
    for (var _i = 0; _i < scope.interactions.length; _i++) {
      var _ref5;
  
      _ref5 = scope.interactions[_i];
      var interaction = _ref5;
  
      var otherAction = interaction.prepared.name;
  
      if (!interaction.interacting()) {
        continue;
      }
  
      activeInteractions++;
  
      if (activeInteractions >= autoStart.maxInteractions) {
        return false;
      }
  
      if (interaction.target !== interactable) {
        continue;
      }
  
      targetCount += otherAction === action.name | 0;
  
      if (targetCount >= maxActions) {
        return false;
      }
  
      if (interaction.element === element) {
        targetElementCount++;
  
        if (otherAction !== action.name || targetElementCount >= maxPerElement) {
          return false;
        }
      }
    }
  
    return autoStart.maxInteractions > 0;
  }
  
  /**
   * Returns or sets the maximum number of concurrent interactions allowed.  By
   * default only 1 interaction is allowed at a time (for backwards
   * compatibility). To allow multiple interactions on the same Interactables and
   * elements, you need to enable it in the draggable, resizable and gesturable
   * `'max'` and `'maxPerElement'` options.
   *
   * @alias module:interact.maxInteractions
   *
   * @param {number} [newValue] Any number. newValue <= 0 means no interactions.
   */
  interact.maxInteractions = function (newValue) {
    if (utils.is.number(newValue)) {
      autoStart.maxInteractions = newValue;
  
      return interact;
    }
  
    return autoStart.maxInteractions;
  };
  
  Interactable.settingsMethods.push('styleCursor');
  Interactable.settingsMethods.push('actionChecker');
  Interactable.settingsMethods.push('ignoreFrom');
  Interactable.settingsMethods.push('allowFrom');
  
  defaultOptions.base.actionChecker = null;
  defaultOptions.base.styleCursor = true;
  
  utils.extend(defaultOptions.perAction, autoStart.defaults.perAction);
  
  module.exports = autoStart;
  
  },{"../Interactable":4,"../Interaction":5,"../actions/base":6,"../defaultOptions":18,"../interact":21,"../scope":33,"../utils":44,"../utils/Signals":34,"./InteractableMethods":12}],14:[function(require,module,exports){
  'use strict';
  
  var autoStart = require('./base');
  var scope = require('../scope');
  var is = require('../utils/is');
  
  var _require = require('../utils/domUtils'),
      parentNode = _require.parentNode;
  
  autoStart.setActionDefaults(require('../actions/drag'));
  
  autoStart.signals.on('before-start', function (_ref) {
    var interaction = _ref.interaction,
        eventTarget = _ref.eventTarget,
        dx = _ref.dx,
        dy = _ref.dy;
  
    if (interaction.prepared.name !== 'drag') {
      return;
    }
  
    // check if a drag is in the correct axis
    var absX = Math.abs(dx);
    var absY = Math.abs(dy);
    var targetOptions = interaction.target.options.drag;
    var startAxis = targetOptions.startAxis;
    var currentAxis = absX > absY ? 'x' : absX < absY ? 'y' : 'xy';
  
    interaction.prepared.axis = targetOptions.lockAxis === 'start' ? currentAxis[0] // always lock to one axis even if currentAxis === 'xy'
    : targetOptions.lockAxis;
  
    // if the movement isn't in the startAxis of the interactable
    if (currentAxis !== 'xy' && startAxis !== 'xy' && startAxis !== currentAxis) {
      // cancel the prepared action
      interaction.prepared.name = null;
  
      // then try to get a drag from another ineractable
      var element = eventTarget;
  
      var getDraggable = function getDraggable(interactable) {
        if (interactable === interaction.target) {
          return;
        }
  
        var options = interaction.target.options.drag;
  
        if (!options.manualStart && interactable.testIgnoreAllow(options, element, eventTarget)) {
  
          var action = interactable.getAction(interaction.downPointer, interaction.downEvent, interaction, element);
  
          if (action && action.name === 'drag' && checkStartAxis(currentAxis, interactable) && autoStart.validateAction(action, interactable, element, eventTarget)) {
  
            return interactable;
          }
        }
      };
  
      // check all interactables
      while (is.element(element)) {
        var interactable = scope.interactables.forEachMatch(element, getDraggable);
  
        if (interactable) {
          interaction.prepared.name = 'drag';
          interaction.target = interactable;
          interaction.element = element;
          break;
        }
  
        element = parentNode(element);
      }
    }
  });
  
  function checkStartAxis(startAxis, interactable) {
    if (!interactable) {
      return false;
    }
  
    var thisAxis = interactable.options.drag.startAxis;
  
    return startAxis === 'xy' || thisAxis === 'xy' || thisAxis === startAxis;
  }
  
  },{"../actions/drag":7,"../scope":33,"../utils/domUtils":39,"../utils/is":46,"./base":13}],15:[function(require,module,exports){
  'use strict';
  
  require('./base').setActionDefaults(require('../actions/gesture'));
  
  },{"../actions/gesture":9,"./base":13}],16:[function(require,module,exports){
  'use strict';
  
  var autoStart = require('./base');
  var Interaction = require('../Interaction');
  
  autoStart.defaults.perAction.hold = 0;
  autoStart.defaults.perAction.delay = 0;
  
  Interaction.signals.on('new', function (interaction) {
    interaction.autoStartHoldTimer = null;
  });
  
  autoStart.signals.on('prepared', function (_ref) {
    var interaction = _ref.interaction;
  
    var hold = getHoldDuration(interaction);
  
    if (hold > 0) {
      interaction.autoStartHoldTimer = setTimeout(function () {
        interaction.start(interaction.prepared, interaction.target, interaction.element);
      }, hold);
    }
  });
  
  Interaction.signals.on('move', function (_ref2) {
    var interaction = _ref2.interaction,
        duplicate = _ref2.duplicate;
  
    if (interaction.pointerWasMoved && !duplicate) {
      clearTimeout(interaction.autoStartHoldTimer);
    }
  });
  
  // prevent regular down->move autoStart
  autoStart.signals.on('before-start', function (_ref3) {
    var interaction = _ref3.interaction;
  
    var hold = getHoldDuration(interaction);
  
    if (hold > 0) {
      interaction.prepared.name = null;
    }
  });
  
  function getHoldDuration(interaction) {
    var actionName = interaction.prepared && interaction.prepared.name;
  
    if (!actionName) {
      return null;
    }
  
    var options = interaction.target.options;
  
    return options[actionName].hold || options[actionName].delay;
  }
  
  module.exports = {
    getHoldDuration: getHoldDuration
  };
  
  },{"../Interaction":5,"./base":13}],17:[function(require,module,exports){
  'use strict';
  
  require('./base').setActionDefaults(require('../actions/resize'));
  
  },{"../actions/resize":10,"./base":13}],18:[function(require,module,exports){
  'use strict';
  
  module.exports = {
    base: {
      accept: null,
      preventDefault: 'auto',
      deltaSource: 'page'
    },
  
    perAction: {
      origin: { x: 0, y: 0 },
  
      inertia: {
        enabled: false,
        resistance: 10, // the lambda in exponential decay
        minSpeed: 100, // target speed must be above this for inertia to start
        endSpeed: 10, // the speed at which inertia is slow enough to stop
        allowResume: true, // allow resuming an action in inertia phase
        smoothEndDuration: 300 // animate to snap/restrict endOnly if there's no inertia
      }
    }
  };
  
  },{}],19:[function(require,module,exports){
  'use strict';
  
  /* browser entry point */
  
  // inertia
  require('./inertia');
  
  // modifiers
  require('./modifiers/snap');
  require('./modifiers/restrict');
  
  // pointerEvents
  require('./pointerEvents/base');
  require('./pointerEvents/holdRepeat');
  require('./pointerEvents/interactableTargets');
  
  // autoStart hold
  require('./autoStart/hold');
  
  // actions
  require('./actions/gesture');
  require('./actions/resize');
  require('./actions/drag');
  require('./actions/drop');
  
  // load these modifiers after resize is loaded
  require('./modifiers/snapSize');
  require('./modifiers/restrictEdges');
  require('./modifiers/restrictSize');
  
  // autoStart actions
  require('./autoStart/gesture');
  require('./autoStart/resize');
  require('./autoStart/drag');
  
  // Interactable preventDefault setting
  require('./interactablePreventDefault.js');
  
  // autoScroll
  require('./autoScroll');
  
  // export interact
  module.exports = require('./interact');
  
  },{"./actions/drag":7,"./actions/drop":8,"./actions/gesture":9,"./actions/resize":10,"./autoScroll":11,"./autoStart/drag":14,"./autoStart/gesture":15,"./autoStart/hold":16,"./autoStart/resize":17,"./inertia":20,"./interact":21,"./interactablePreventDefault.js":22,"./modifiers/restrict":24,"./modifiers/restrictEdges":25,"./modifiers/restrictSize":26,"./modifiers/snap":27,"./modifiers/snapSize":28,"./pointerEvents/base":30,"./pointerEvents/holdRepeat":31,"./pointerEvents/interactableTargets":32}],20:[function(require,module,exports){
  'use strict';
  
  var InteractEvent = require('./InteractEvent');
  var Interaction = require('./Interaction');
  var modifiers = require('./modifiers/base');
  var utils = require('./utils');
  var animationFrame = require('./utils/raf');
  
  Interaction.signals.on('new', function (interaction) {
    interaction.inertiaStatus = {
      active: false,
      smoothEnd: false,
      allowResume: false,
  
      startEvent: null,
      upCoords: {},
  
      xe: 0, ye: 0,
      sx: 0, sy: 0,
  
      t0: 0,
      vx0: 0, vys: 0,
      duration: 0,
  
      lambda_v0: 0,
      one_ve_v0: 0,
      i: null
    };
  
    interaction.boundInertiaFrame = function () {
      return inertiaFrame.apply(interaction);
    };
    interaction.boundSmoothEndFrame = function () {
      return smoothEndFrame.apply(interaction);
    };
  });
  
  Interaction.signals.on('down', function (_ref) {
    var interaction = _ref.interaction,
        event = _ref.event,
        pointer = _ref.pointer,
        eventTarget = _ref.eventTarget;
  
    var status = interaction.inertiaStatus;
  
    // Check if the down event hits the current inertia target
    if (status.active) {
      var element = eventTarget;
  
      // climb up the DOM tree from the event target
      while (utils.is.element(element)) {
  
        // if interaction element is the current inertia target element
        if (element === interaction.element) {
          // stop inertia
          animationFrame.cancel(status.i);
          status.active = false;
          interaction.simulation = null;
  
          // update pointers to the down event's coordinates
          interaction.updatePointer(pointer);
          utils.setCoords(interaction.curCoords, interaction.pointers);
  
          // fire appropriate signals
          var signalArg = { interaction: interaction };
          Interaction.signals.fire('before-action-move', signalArg);
          Interaction.signals.fire('action-resume', signalArg);
  
          // fire a reume event
          var resumeEvent = new InteractEvent(interaction, event, interaction.prepared.name, 'inertiaresume', interaction.element);
  
          interaction.target.fire(resumeEvent);
          interaction.prevEvent = resumeEvent;
          modifiers.resetStatuses(interaction.modifierStatuses);
  
          utils.copyCoords(interaction.prevCoords, interaction.curCoords);
          break;
        }
  
        element = utils.parentNode(element);
      }
    }
  });
  
  Interaction.signals.on('up', function (_ref2) {
    var interaction = _ref2.interaction,
        event = _ref2.event;
  
    var status = interaction.inertiaStatus;
  
    if (!interaction.interacting() || status.active) {
      return;
    }
  
    var target = interaction.target;
    var options = target && target.options;
    var inertiaOptions = options && interaction.prepared.name && options[interaction.prepared.name].inertia;
  
    var now = new Date().getTime();
    var statuses = {};
    var page = utils.extend({}, interaction.curCoords.page);
    var pointerSpeed = interaction.pointerDelta.client.speed;
  
    var smoothEnd = false;
    var modifierResult = void 0;
  
    // check if inertia should be started
    var inertiaPossible = inertiaOptions && inertiaOptions.enabled && interaction.prepared.name !== 'gesture' && event !== status.startEvent;
  
    var inertia = inertiaPossible && now - interaction.curCoords.timeStamp < 50 && pointerSpeed > inertiaOptions.minSpeed && pointerSpeed > inertiaOptions.endSpeed;
  
    var modifierArg = {
      interaction: interaction,
      pageCoords: page,
      statuses: statuses,
      preEnd: true,
      requireEndOnly: true
    };
  
    // smoothEnd
    if (inertiaPossible && !inertia) {
      modifiers.resetStatuses(statuses);
  
      modifierResult = modifiers.setAll(modifierArg);
  
      if (modifierResult.shouldMove && modifierResult.locked) {
        smoothEnd = true;
      }
    }
  
    if (!(inertia || smoothEnd)) {
      return;
    }
  
    utils.copyCoords(status.upCoords, interaction.curCoords);
  
    interaction.pointers[0] = status.startEvent = new InteractEvent(interaction, event, interaction.prepared.name, 'inertiastart', interaction.element);
  
    status.t0 = now;
  
    status.active = true;
    status.allowResume = inertiaOptions.allowResume;
    interaction.simulation = status;
  
    target.fire(status.startEvent);
  
    if (inertia) {
      status.vx0 = interaction.pointerDelta.client.vx;
      status.vy0 = interaction.pointerDelta.client.vy;
      status.v0 = pointerSpeed;
  
      calcInertia(interaction, status);
  
      utils.extend(page, interaction.curCoords.page);
  
      page.x += status.xe;
      page.y += status.ye;
  
      modifiers.resetStatuses(statuses);
  
      modifierResult = modifiers.setAll(modifierArg);
  
      status.modifiedXe += modifierResult.dx;
      status.modifiedYe += modifierResult.dy;
  
      status.i = animationFrame.request(interaction.boundInertiaFrame);
    } else {
      status.smoothEnd = true;
      status.xe = modifierResult.dx;
      status.ye = modifierResult.dy;
  
      status.sx = status.sy = 0;
  
      status.i = animationFrame.request(interaction.boundSmoothEndFrame);
    }
  });
  
  Interaction.signals.on('stop-active', function (_ref3) {
    var interaction = _ref3.interaction;
  
    var status = interaction.inertiaStatus;
  
    if (status.active) {
      animationFrame.cancel(status.i);
      status.active = false;
      interaction.simulation = null;
    }
  });
  
  function calcInertia(interaction, status) {
    var inertiaOptions = interaction.target.options[interaction.prepared.name].inertia;
    var lambda = inertiaOptions.resistance;
    var inertiaDur = -Math.log(inertiaOptions.endSpeed / status.v0) / lambda;
  
    status.x0 = interaction.prevEvent.pageX;
    status.y0 = interaction.prevEvent.pageY;
    status.t0 = status.startEvent.timeStamp / 1000;
    status.sx = status.sy = 0;
  
    status.modifiedXe = status.xe = (status.vx0 - inertiaDur) / lambda;
    status.modifiedYe = status.ye = (status.vy0 - inertiaDur) / lambda;
    status.te = inertiaDur;
  
    status.lambda_v0 = lambda / status.v0;
    status.one_ve_v0 = 1 - inertiaOptions.endSpeed / status.v0;
  }
  
  function inertiaFrame() {
    updateInertiaCoords(this);
    utils.setCoordDeltas(this.pointerDelta, this.prevCoords, this.curCoords);
  
    var status = this.inertiaStatus;
    var options = this.target.options[this.prepared.name].inertia;
    var lambda = options.resistance;
    var t = new Date().getTime() / 1000 - status.t0;
  
    if (t < status.te) {
  
      var progress = 1 - (Math.exp(-lambda * t) - status.lambda_v0) / status.one_ve_v0;
  
      if (status.modifiedXe === status.xe && status.modifiedYe === status.ye) {
        status.sx = status.xe * progress;
        status.sy = status.ye * progress;
      } else {
        var quadPoint = utils.getQuadraticCurvePoint(0, 0, status.xe, status.ye, status.modifiedXe, status.modifiedYe, progress);
  
        status.sx = quadPoint.x;
        status.sy = quadPoint.y;
      }
  
      this.doMove();
  
      status.i = animationFrame.request(this.boundInertiaFrame);
    } else {
      status.sx = status.modifiedXe;
      status.sy = status.modifiedYe;
  
      this.doMove();
      this.end(status.startEvent);
      status.active = false;
      this.simulation = null;
    }
  
    utils.copyCoords(this.prevCoords, this.curCoords);
  }
  
  function smoothEndFrame() {
    updateInertiaCoords(this);
  
    var status = this.inertiaStatus;
    var t = new Date().getTime() - status.t0;
    var duration = this.target.options[this.prepared.name].inertia.smoothEndDuration;
  
    if (t < duration) {
      status.sx = utils.easeOutQuad(t, 0, status.xe, duration);
      status.sy = utils.easeOutQuad(t, 0, status.ye, duration);
  
      this.pointerMove(status.startEvent, status.startEvent);
  
      status.i = animationFrame.request(this.boundSmoothEndFrame);
    } else {
      status.sx = status.xe;
      status.sy = status.ye;
  
      this.pointerMove(status.startEvent, status.startEvent);
      this.end(status.startEvent);
  
      status.smoothEnd = status.active = false;
      this.simulation = null;
    }
  }
  
  function updateInertiaCoords(interaction) {
    var status = interaction.inertiaStatus;
  
    // return if inertia isn't running
    if (!status.active) {
      return;
    }
  
    var pageUp = status.upCoords.page;
    var clientUp = status.upCoords.client;
  
    utils.setCoords(interaction.curCoords, [{
      pageX: pageUp.x + status.sx,
      pageY: pageUp.y + status.sy,
      clientX: clientUp.x + status.sx,
      clientY: clientUp.y + status.sy
    }]);
  }
  
  },{"./InteractEvent":3,"./Interaction":5,"./modifiers/base":23,"./utils":44,"./utils/raf":50}],21:[function(require,module,exports){
  'use strict';
  
  /** @module interact */
  
  var browser = require('./utils/browser');
  var events = require('./utils/events');
  var utils = require('./utils');
  var scope = require('./scope');
  var Interactable = require('./Interactable');
  var Interaction = require('./Interaction');
  
  var globalEvents = {};
  
  /**
   * ```js
   * interact('#draggable').draggable(true);
   *
   * var rectables = interact('rect');
   * rectables
   *   .gesturable(true)
   *   .on('gesturemove', function (event) {
   *       // ...
   *   });
   * ```
   *
   * The methods of this variable can be used to set elements as interactables
   * and also to change various default settings.
   *
   * Calling it as a function and passing an element or a valid CSS selector
   * string returns an Interactable object which has various methods to configure
   * it.
   *
   * @global
   *
   * @param {Element | string} element The HTML or SVG Element to interact with
   * or CSS selector
   * @return {Interactable}
   */
  function interact(element, options) {
    var interactable = scope.interactables.get(element, options);
  
    if (!interactable) {
      interactable = new Interactable(element, options);
      interactable.events.global = globalEvents;
    }
  
    return interactable;
  }
  
  /**
   * Check if an element or selector has been set with the {@link interact}
   * function
   *
   * @alias module:interact.isSet
   *
   * @param {Element} element The Element being searched for
   * @return {boolean} Indicates if the element or CSS selector was previously
   * passed to interact
  */
  interact.isSet = function (element, options) {
    return scope.interactables.indexOfElement(element, options && options.context) !== -1;
  };
  
  /**
   * Add a global listener for an InteractEvent or adds a DOM event to `document`
   *
   * @alias module:interact.on
   *
   * @param {string | array | object} type The types of events to listen for
   * @param {function} listener The function event (s)
   * @param {object | boolean} [options] object or useCapture flag for
   * addEventListener
   * @return {object} interact
   */
  interact.on = function (type, listener, options) {
    if (utils.is.string(type) && type.search(' ') !== -1) {
      type = type.trim().split(/ +/);
    }
  
    if (utils.is.array(type)) {
      for (var _i = 0; _i < type.length; _i++) {
        var _ref;
  
        _ref = type[_i];
        var eventType = _ref;
  
        interact.on(eventType, listener, options);
      }
  
      return interact;
    }
  
    if (utils.is.object(type)) {
      for (var prop in type) {
        interact.on(prop, type[prop], listener);
      }
  
      return interact;
    }
  
    // if it is an InteractEvent type, add listener to globalEvents
    if (utils.contains(Interactable.eventTypes, type)) {
      // if this type of event was never bound
      if (!globalEvents[type]) {
        globalEvents[type] = [listener];
      } else {
        globalEvents[type].push(listener);
      }
    }
    // If non InteractEvent type, addEventListener to document
    else {
        events.add(scope.document, type, listener, { options: options });
      }
  
    return interact;
  };
  
  /**
   * Removes a global InteractEvent listener or DOM event from `document`
   *
   * @alias module:interact.off
   *
   * @param {string | array | object} type The types of events that were listened
   * for
   * @param {function} listener The listener function to be removed
   * @param {object | boolean} options [options] object or useCapture flag for
   * removeEventListener
   * @return {object} interact
   */
  interact.off = function (type, listener, options) {
    if (utils.is.string(type) && type.search(' ') !== -1) {
      type = type.trim().split(/ +/);
    }
  
    if (utils.is.array(type)) {
      for (var _i2 = 0; _i2 < type.length; _i2++) {
        var _ref2;
  
        _ref2 = type[_i2];
        var eventType = _ref2;
  
        interact.off(eventType, listener, options);
      }
  
      return interact;
    }
  
    if (utils.is.object(type)) {
      for (var prop in type) {
        interact.off(prop, type[prop], listener);
      }
  
      return interact;
    }
  
    if (!utils.contains(Interactable.eventTypes, type)) {
      events.remove(scope.document, type, listener, options);
    } else {
      var index = void 0;
  
      if (type in globalEvents && (index = globalEvents[type].indexOf(listener)) !== -1) {
        globalEvents[type].splice(index, 1);
      }
    }
  
    return interact;
  };
  
  /**
   * Returns an object which exposes internal data
  
   * @alias module:interact.debug
   *
   * @return {object} An object with properties that outline the current state
   * and expose internal functions and variables
   */
  interact.debug = function () {
    return scope;
  };
  
  // expose the functions used to calculate multi-touch properties
  interact.getPointerAverage = utils.pointerAverage;
  interact.getTouchBBox = utils.touchBBox;
  interact.getTouchDistance = utils.touchDistance;
  interact.getTouchAngle = utils.touchAngle;
  
  interact.getElementRect = utils.getElementRect;
  interact.getElementClientRect = utils.getElementClientRect;
  interact.matchesSelector = utils.matchesSelector;
  interact.closest = utils.closest;
  
  /**
   * @alias module:interact.supportsTouch
   *
   * @return {boolean} Whether or not the browser supports touch input
   */
  interact.supportsTouch = function () {
    return browser.supportsTouch;
  };
  
  /**
   * @alias module:interact.supportsPointerEvent
   *
   * @return {boolean} Whether or not the browser supports PointerEvents
   */
  interact.supportsPointerEvent = function () {
    return browser.supportsPointerEvent;
  };
  
  /**
   * Cancels all interactions (end events are not fired)
   *
   * @alias module:interact.stop
   *
   * @param {Event} event An event on which to call preventDefault()
   * @return {object} interact
   */
  interact.stop = function (event) {
    for (var i = scope.interactions.length - 1; i >= 0; i--) {
      scope.interactions[i].stop(event);
    }
  
    return interact;
  };
  
  /**
   * Returns or sets the distance the pointer must be moved before an action
   * sequence occurs. This also affects tolerance for tap events.
   *
   * @alias module:interact.pointerMoveTolerance
   *
   * @param {number} [newValue] The movement from the start position must be greater than this value
   * @return {interact | number}
   */
  interact.pointerMoveTolerance = function (newValue) {
    if (utils.is.number(newValue)) {
      Interaction.pointerMoveTolerance = newValue;
  
      return interact;
    }
  
    return Interaction.pointerMoveTolerance;
  };
  
  interact.addDocument = scope.addDocument;
  interact.removeDocument = scope.removeDocument;
  
  scope.interact = interact;
  
  module.exports = interact;
  
  },{"./Interactable":4,"./Interaction":5,"./scope":33,"./utils":44,"./utils/browser":36,"./utils/events":40}],22:[function(require,module,exports){
  'use strict';
  
  var Interactable = require('./Interactable');
  var Interaction = require('./Interaction');
  var scope = require('./scope');
  var is = require('./utils/is');
  var events = require('./utils/events');
  var browser = require('./utils/browser');
  
  var _require = require('./utils/domUtils'),
      nodeContains = _require.nodeContains,
      matchesSelector = _require.matchesSelector;
  
  /**
   * Returns or sets whether to prevent the browser's default behaviour in
   * response to pointer events. Can be set to:
   *  - `'always'` to always prevent
   *  - `'never'` to never prevent
   *  - `'auto'` to let interact.js try to determine what would be best
   *
   * @param {string} [newValue] `true`, `false` or `'auto'`
   * @return {string | Interactable} The current setting or this Interactable
   */
  
  
  Interactable.prototype.preventDefault = function (newValue) {
    if (/^(always|never|auto)$/.test(newValue)) {
      this.options.preventDefault = newValue;
      return this;
    }
  
    if (is.bool(newValue)) {
      this.options.preventDefault = newValue ? 'always' : 'never';
      return this;
    }
  
    return this.options.preventDefault;
  };
  
  Interactable.prototype.checkAndPreventDefault = function (event) {
    var setting = this.options.preventDefault;
  
    if (setting === 'never') {
      return;
    }
  
    if (setting === 'always') {
      event.preventDefault();
      return;
    }
  
    // setting === 'auto'
  
    // don't preventDefault of touch{start,move} events if the browser supports passive
    // events listeners. CSS touch-action and user-selecct should be used instead
    if (events.supportsPassive && /^touch(start|move)$/.test(event.type) && !browser.isIOS) {
      return;
    }
  
    // don't preventDefault of pointerdown events
    if (/^(mouse|pointer|touch)*(down|start)/i.test(event.type)) {
      return;
    }
  
    // don't preventDefault on editable elements
    if (is.element(event.target) && matchesSelector(event.target, 'input,select,textarea,[contenteditable=true],[contenteditable=true] *')) {
      return;
    }
  
    event.preventDefault();
  };
  
  function onInteractionEvent(_ref) {
    var interaction = _ref.interaction,
        event = _ref.event;
  
    if (interaction.target) {
      interaction.target.checkAndPreventDefault(event);
    }
  }
  
  var _arr = ['down', 'move', 'up', 'cancel'];
  for (var _i = 0; _i < _arr.length; _i++) {
    var eventSignal = _arr[_i];
    Interaction.signals.on(eventSignal, onInteractionEvent);
  }
  
  // prevent native HTML5 drag on interact.js target elements
  Interaction.docEvents.dragstart = function preventNativeDrag(event) {
    for (var _i2 = 0; _i2 < scope.interactions.length; _i2++) {
      var _ref2;
  
      _ref2 = scope.interactions[_i2];
      var interaction = _ref2;
  
  
      if (interaction.element && (interaction.element === event.target || nodeContains(interaction.element, event.target))) {
  
        interaction.target.checkAndPreventDefault(event);
        return;
      }
    }
  };
  
  },{"./Interactable":4,"./Interaction":5,"./scope":33,"./utils/browser":36,"./utils/domUtils":39,"./utils/events":40,"./utils/is":46}],23:[function(require,module,exports){
  'use strict';
  
  var InteractEvent = require('../InteractEvent');
  var Interaction = require('../Interaction');
  var extend = require('../utils/extend');
  
  var modifiers = {
    names: [],
  
    setOffsets: function setOffsets(arg) {
      var interaction = arg.interaction,
          page = arg.pageCoords;
      var target = interaction.target,
          element = interaction.element,
          startOffset = interaction.startOffset;
  
      var rect = target.getRect(element);
  
      if (rect) {
        startOffset.left = page.x - rect.left;
        startOffset.top = page.y - rect.top;
  
        startOffset.right = rect.right - page.x;
        startOffset.bottom = rect.bottom - page.y;
  
        if (!('width' in rect)) {
          rect.width = rect.right - rect.left;
        }
        if (!('height' in rect)) {
          rect.height = rect.bottom - rect.top;
        }
      } else {
        startOffset.left = startOffset.top = startOffset.right = startOffset.bottom = 0;
      }
  
      arg.rect = rect;
      arg.interactable = target;
      arg.element = element;
  
      for (var _i = 0; _i < modifiers.names.length; _i++) {
        var _ref;
  
        _ref = modifiers.names[_i];
        var modifierName = _ref;
  
        arg.options = target.options[interaction.prepared.name][modifierName];
  
        if (!arg.options) {
          continue;
        }
  
        interaction.modifierOffsets[modifierName] = modifiers[modifierName].setOffset(arg);
      }
    },
  
    setAll: function setAll(arg) {
      var interaction = arg.interaction,
          statuses = arg.statuses,
          preEnd = arg.preEnd,
          requireEndOnly = arg.requireEndOnly;
  
      var result = {
        dx: 0,
        dy: 0,
        changed: false,
        locked: false,
        shouldMove: true
      };
  
      arg.modifiedCoords = extend({}, arg.pageCoords);
  
      for (var _i2 = 0; _i2 < modifiers.names.length; _i2++) {
        var _ref2;
  
        _ref2 = modifiers.names[_i2];
        var modifierName = _ref2;
  
        var modifier = modifiers[modifierName];
        var options = interaction.target.options[interaction.prepared.name][modifierName];
  
        if (!shouldDo(options, preEnd, requireEndOnly)) {
          continue;
        }
  
        arg.status = arg.status = statuses[modifierName];
        arg.options = options;
        arg.offset = arg.interaction.modifierOffsets[modifierName];
  
        modifier.set(arg);
  
        if (arg.status.locked) {
          arg.modifiedCoords.x += arg.status.dx;
          arg.modifiedCoords.y += arg.status.dy;
  
          result.dx += arg.status.dx;
          result.dy += arg.status.dy;
  
          result.locked = true;
        }
      }
  
      // a move should be fired if:
      //  - there are no modifiers enabled,
      //  - no modifiers are "locked" i.e. have changed the pointer's coordinates, or
      //  - the locked coords have changed since the last pointer move
      result.shouldMove = !arg.status || !result.locked || arg.status.changed;
  
      return result;
    },
  
    resetStatuses: function resetStatuses(statuses) {
      for (var _i3 = 0; _i3 < modifiers.names.length; _i3++) {
        var _ref3;
  
        _ref3 = modifiers.names[_i3];
        var modifierName = _ref3;
  
        var status = statuses[modifierName] || {};
  
        status.dx = status.dy = 0;
        status.modifiedX = status.modifiedY = NaN;
        status.locked = false;
        status.changed = true;
  
        statuses[modifierName] = status;
      }
  
      return statuses;
    },
  
    start: function start(_ref4, signalName) {
      var interaction = _ref4.interaction;
  
      var arg = {
        interaction: interaction,
        pageCoords: (signalName === 'action-resume' ? interaction.curCoords : interaction.startCoords).page,
        startOffset: interaction.startOffset,
        statuses: interaction.modifierStatuses,
        preEnd: false,
        requireEndOnly: false
      };
  
      modifiers.setOffsets(arg);
      modifiers.resetStatuses(arg.statuses);
  
      arg.pageCoords = extend({}, interaction.startCoords.page);
      interaction.modifierResult = modifiers.setAll(arg);
    },
  
    beforeMove: function beforeMove(_ref5) {
      var interaction = _ref5.interaction,
          preEnd = _ref5.preEnd,
          interactingBeforeMove = _ref5.interactingBeforeMove;
  
      var modifierResult = modifiers.setAll({
        interaction: interaction,
        preEnd: preEnd,
        pageCoords: interaction.curCoords.page,
        statuses: interaction.modifierStatuses,
        requireEndOnly: false
      });
  
      // don't fire an action move if a modifier would keep the event in the same
      // cordinates as before
      if (!modifierResult.shouldMove && interactingBeforeMove) {
        interaction._dontFireMove = true;
      }
  
      interaction.modifierResult = modifierResult;
    },
  
    end: function end(_ref6) {
      var interaction = _ref6.interaction,
          event = _ref6.event;
  
      for (var _i4 = 0; _i4 < modifiers.names.length; _i4++) {
        var _ref7;
  
        _ref7 = modifiers.names[_i4];
        var modifierName = _ref7;
  
        var options = interaction.target.options[interaction.prepared.name][modifierName];
  
        // if the endOnly option is true for any modifier
        if (shouldDo(options, true, true)) {
          // fire a move event at the modified coordinates
          interaction.doMove({ event: event, preEnd: true });
          break;
        }
      }
    },
  
    setXY: function setXY(arg) {
      var iEvent = arg.iEvent,
          interaction = arg.interaction;
  
      var modifierArg = extend({}, arg);
  
      for (var i = 0; i < modifiers.names.length; i++) {
        var modifierName = modifiers.names[i];
        modifierArg.options = interaction.target.options[interaction.prepared.name][modifierName];
  
        if (!modifierArg.options) {
          continue;
        }
  
        var modifier = modifiers[modifierName];
  
        modifierArg.status = interaction.modifierStatuses[modifierName];
  
        iEvent[modifierName] = modifier.modifyCoords(modifierArg);
      }
    }
  };
  
  Interaction.signals.on('new', function (interaction) {
    interaction.startOffset = { left: 0, right: 0, top: 0, bottom: 0 };
    interaction.modifierOffsets = {};
    interaction.modifierStatuses = modifiers.resetStatuses({});
    interaction.modifierResult = null;
  });
  
  Interaction.signals.on('action-start', modifiers.start);
  Interaction.signals.on('action-resume', modifiers.start);
  Interaction.signals.on('before-action-move', modifiers.beforeMove);
  Interaction.signals.on('action-end', modifiers.end);
  
  InteractEvent.signals.on('set-xy', modifiers.setXY);
  
  function shouldDo(options, preEnd, requireEndOnly) {
    return options && options.enabled && (preEnd || !options.endOnly) && (!requireEndOnly || options.endOnly);
  }
  
  module.exports = modifiers;
  
  },{"../InteractEvent":3,"../Interaction":5,"../utils/extend":41}],24:[function(require,module,exports){
  'use strict';
  
  var modifiers = require('./base');
  var utils = require('../utils');
  var defaultOptions = require('../defaultOptions');
  
  var restrict = {
    defaults: {
      enabled: false,
      endOnly: false,
      restriction: null,
      elementRect: null
    },
  
    setOffset: function setOffset(_ref) {
      var rect = _ref.rect,
          startOffset = _ref.startOffset,
          options = _ref.options;
  
      var elementRect = options && options.elementRect;
      var offset = {};
  
      if (rect && elementRect) {
        offset.left = startOffset.left - rect.width * elementRect.left;
        offset.top = startOffset.top - rect.height * elementRect.top;
  
        offset.right = startOffset.right - rect.width * (1 - elementRect.right);
        offset.bottom = startOffset.bottom - rect.height * (1 - elementRect.bottom);
      } else {
        offset.left = offset.top = offset.right = offset.bottom = 0;
      }
  
      return offset;
    },
  
    set: function set(_ref2) {
      var modifiedCoords = _ref2.modifiedCoords,
          interaction = _ref2.interaction,
          status = _ref2.status,
          options = _ref2.options;
  
      if (!options) {
        return status;
      }
  
      var page = status.useStatusXY ? { x: status.x, y: status.y } : utils.extend({}, modifiedCoords);
  
      var restriction = getRestrictionRect(options.restriction, interaction, page);
  
      if (!restriction) {
        return status;
      }
  
      status.dx = 0;
      status.dy = 0;
      status.locked = false;
  
      var rect = restriction;
      var modifiedX = page.x;
      var modifiedY = page.y;
  
      var offset = interaction.modifierOffsets.restrict;
  
      // object is assumed to have
      // x, y, width, height or
      // left, top, right, bottom
      if ('x' in restriction && 'y' in restriction) {
        modifiedX = Math.max(Math.min(rect.x + rect.width - offset.right, page.x), rect.x + offset.left);
        modifiedY = Math.max(Math.min(rect.y + rect.height - offset.bottom, page.y), rect.y + offset.top);
      } else {
        modifiedX = Math.max(Math.min(rect.right - offset.right, page.x), rect.left + offset.left);
        modifiedY = Math.max(Math.min(rect.bottom - offset.bottom, page.y), rect.top + offset.top);
      }
  
      status.dx = modifiedX - page.x;
      status.dy = modifiedY - page.y;
  
      status.changed = status.modifiedX !== modifiedX || status.modifiedY !== modifiedY;
      status.locked = !!(status.dx || status.dy);
  
      status.modifiedX = modifiedX;
      status.modifiedY = modifiedY;
    },
  
    modifyCoords: function modifyCoords(_ref3) {
      var page = _ref3.page,
          client = _ref3.client,
          status = _ref3.status,
          phase = _ref3.phase,
          options = _ref3.options;
  
      var elementRect = options && options.elementRect;
  
      if (options && options.enabled && !(phase === 'start' && elementRect && status.locked)) {
  
        if (status.locked) {
          page.x += status.dx;
          page.y += status.dy;
          client.x += status.dx;
          client.y += status.dy;
  
          return {
            dx: status.dx,
            dy: status.dy
          };
        }
      }
    },
  
    getRestrictionRect: getRestrictionRect
  };
  
  function getRestrictionRect(value, interaction, page) {
    if (utils.is.function(value)) {
      return utils.resolveRectLike(value, interaction.target, interaction.element, [page.x, page.y, interaction]);
    } else {
      return utils.resolveRectLike(value, interaction.target, interaction.element);
    }
  }
  
  modifiers.restrict = restrict;
  modifiers.names.push('restrict');
  
  defaultOptions.perAction.restrict = restrict.defaults;
  
  module.exports = restrict;
  
  },{"../defaultOptions":18,"../utils":44,"./base":23}],25:[function(require,module,exports){
  'use strict';
  
  // This module adds the options.resize.restrictEdges setting which sets min and
  // max for the top, left, bottom and right edges of the target being resized.
  //
  // interact(target).resize({
  //   edges: { top: true, left: true },
  //   restrictEdges: {
  //     inner: { top: 200, left: 200, right: 400, bottom: 400 },
  //     outer: { top:   0, left:   0, right: 600, bottom: 600 },
  //   },
  // });
  
  var modifiers = require('./base');
  var utils = require('../utils');
  var rectUtils = require('../utils/rect');
  var defaultOptions = require('../defaultOptions');
  var resize = require('../actions/resize');
  
  var _require = require('./restrict'),
      getRestrictionRect = _require.getRestrictionRect;
  
  var noInner = { top: +Infinity, left: +Infinity, bottom: -Infinity, right: -Infinity };
  var noOuter = { top: -Infinity, left: -Infinity, bottom: +Infinity, right: +Infinity };
  
  var restrictEdges = {
    defaults: {
      enabled: false,
      endOnly: false,
      min: null,
      max: null,
      offset: null
    },
  
    setOffset: function setOffset(_ref) {
      var interaction = _ref.interaction,
          startOffset = _ref.startOffset,
          options = _ref.options;
  
      if (!options) {
        return utils.extend({}, startOffset);
      }
  
      var offset = getRestrictionRect(options.offset, interaction, interaction.startCoords.page);
  
      if (offset) {
        return {
          top: startOffset.top + offset.y,
          left: startOffset.left + offset.x,
          bottom: startOffset.bottom + offset.y,
          right: startOffset.right + offset.x
        };
      }
  
      return startOffset;
    },
  
    set: function set(_ref2) {
      var modifiedCoords = _ref2.modifiedCoords,
          interaction = _ref2.interaction,
          status = _ref2.status,
          offset = _ref2.offset,
          options = _ref2.options;
  
      var edges = interaction.prepared.linkedEdges || interaction.prepared.edges;
  
      if (!interaction.interacting() || !edges) {
        return;
      }
  
      var page = status.useStatusXY ? { x: status.x, y: status.y } : utils.extend({}, modifiedCoords);
      var inner = rectUtils.xywhToTlbr(getRestrictionRect(options.inner, interaction, page)) || noInner;
      var outer = rectUtils.xywhToTlbr(getRestrictionRect(options.outer, interaction, page)) || noOuter;
  
      var modifiedX = page.x;
      var modifiedY = page.y;
  
      status.dx = 0;
      status.dy = 0;
      status.locked = false;
  
      if (edges.top) {
        modifiedY = Math.min(Math.max(outer.top + offset.top, page.y), inner.top + offset.top);
      } else if (edges.bottom) {
        modifiedY = Math.max(Math.min(outer.bottom - offset.bottom, page.y), inner.bottom - offset.bottom);
      }
      if (edges.left) {
        modifiedX = Math.min(Math.max(outer.left + offset.left, page.x), inner.left + offset.left);
      } else if (edges.right) {
        modifiedX = Math.max(Math.min(outer.right - offset.right, page.x), inner.right - offset.right);
      }
  
      status.dx = modifiedX - page.x;
      status.dy = modifiedY - page.y;
  
      status.changed = status.modifiedX !== modifiedX || status.modifiedY !== modifiedY;
      status.locked = !!(status.dx || status.dy);
  
      status.modifiedX = modifiedX;
      status.modifiedY = modifiedY;
    },
  
    modifyCoords: function modifyCoords(_ref3) {
      var page = _ref3.page,
          client = _ref3.client,
          status = _ref3.status,
          phase = _ref3.phase,
          options = _ref3.options;
  
      if (options && options.enabled && !(phase === 'start' && status.locked)) {
  
        if (status.locked) {
          page.x += status.dx;
          page.y += status.dy;
          client.x += status.dx;
          client.y += status.dy;
  
          return {
            dx: status.dx,
            dy: status.dy
          };
        }
      }
    },
  
    noInner: noInner,
    noOuter: noOuter,
    getRestrictionRect: getRestrictionRect
  };
  
  modifiers.restrictEdges = restrictEdges;
  modifiers.names.push('restrictEdges');
  
  defaultOptions.perAction.restrictEdges = restrictEdges.defaults;
  resize.defaults.restrictEdges = restrictEdges.defaults;
  
  module.exports = restrictEdges;
  
  },{"../actions/resize":10,"../defaultOptions":18,"../utils":44,"../utils/rect":51,"./base":23,"./restrict":24}],26:[function(require,module,exports){
  'use strict';
  
  // This module adds the options.resize.restrictSize setting which sets min and
  // max width and height for the target being resized.
  //
  // interact(target).resize({
  //   edges: { top: true, left: true },
  //   restrictSize: {
  //     min: { width: -600, height: -600 },
  //     max: { width:  600, height:  600 },
  //   },
  // });
  
  var modifiers = require('./base');
  var restrictEdges = require('./restrictEdges');
  var utils = require('../utils');
  var rectUtils = require('../utils/rect');
  var defaultOptions = require('../defaultOptions');
  var resize = require('../actions/resize');
  
  var noMin = { width: -Infinity, height: -Infinity };
  var noMax = { width: +Infinity, height: +Infinity };
  
  var restrictSize = {
    defaults: {
      enabled: false,
      endOnly: false,
      min: null,
      max: null
    },
  
    setOffset: function setOffset(_ref) {
      var interaction = _ref.interaction;
  
      return interaction.startOffset;
    },
  
    set: function set(arg) {
      var interaction = arg.interaction,
          options = arg.options;
  
      var edges = interaction.prepared.linkedEdges || interaction.prepared.edges;
  
      if (!interaction.interacting() || !edges) {
        return;
      }
  
      var rect = rectUtils.xywhToTlbr(interaction.resizeRects.inverted);
  
      var minSize = rectUtils.tlbrToXywh(restrictEdges.getRestrictionRect(options.min, interaction)) || noMin;
      var maxSize = rectUtils.tlbrToXywh(restrictEdges.getRestrictionRect(options.max, interaction)) || noMax;
  
      arg.options = {
        enabled: options.enabled,
        endOnly: options.endOnly,
        inner: utils.extend({}, restrictEdges.noInner),
        outer: utils.extend({}, restrictEdges.noOuter)
      };
  
      if (edges.top) {
        arg.options.inner.top = rect.bottom - minSize.height;
        arg.options.outer.top = rect.bottom - maxSize.height;
      } else if (edges.bottom) {
        arg.options.inner.bottom = rect.top + minSize.height;
        arg.options.outer.bottom = rect.top + maxSize.height;
      }
      if (edges.left) {
        arg.options.inner.left = rect.right - minSize.width;
        arg.options.outer.left = rect.right - maxSize.width;
      } else if (edges.right) {
        arg.options.inner.right = rect.left + minSize.width;
        arg.options.outer.right = rect.left + maxSize.width;
      }
  
      restrictEdges.set(arg);
    },
  
    modifyCoords: restrictEdges.modifyCoords
  };
  
  modifiers.restrictSize = restrictSize;
  modifiers.names.push('restrictSize');
  
  defaultOptions.perAction.restrictSize = restrictSize.defaults;
  resize.defaults.restrictSize = restrictSize.defaults;
  
  module.exports = restrictSize;
  
  },{"../actions/resize":10,"../defaultOptions":18,"../utils":44,"../utils/rect":51,"./base":23,"./restrictEdges":25}],27:[function(require,module,exports){
  'use strict';
  
  var modifiers = require('./base');
  var interact = require('../interact');
  var utils = require('../utils');
  var defaultOptions = require('../defaultOptions');
  
  var snap = {
    defaults: {
      enabled: false,
      endOnly: false,
      range: Infinity,
      targets: null,
      offsets: null,
  
      relativePoints: null
    },
  
    setOffset: function setOffset(_ref) {
      var interaction = _ref.interaction,
          interactable = _ref.interactable,
          element = _ref.element,
          rect = _ref.rect,
          startOffset = _ref.startOffset,
          options = _ref.options;
  
      var offsets = [];
      var optionsOrigin = utils.rectToXY(utils.resolveRectLike(options.origin));
      var origin = optionsOrigin || utils.getOriginXY(interactable, element, interaction.prepared.name);
      options = options || interactable.options[interaction.prepared.name].snap || {};
  
      var snapOffset = void 0;
  
      if (options.offset === 'startCoords') {
        snapOffset = {
          x: interaction.startCoords.page.x - origin.x,
          y: interaction.startCoords.page.y - origin.y
        };
      } else {
        var offsetRect = utils.resolveRectLike(options.offset, interactable, element, [interaction]);
  
        snapOffset = utils.rectToXY(offsetRect) || { x: 0, y: 0 };
      }
  
      if (rect && options.relativePoints && options.relativePoints.length) {
        for (var _i = 0; _i < options.relativePoints.length; _i++) {
          var _ref3;
  
          _ref3 = options.relativePoints[_i];
          var _ref2 = _ref3;
          var relativeX = _ref2.x;
          var relativeY = _ref2.y;
  
          offsets.push({
            x: startOffset.left - rect.width * relativeX + snapOffset.x,
            y: startOffset.top - rect.height * relativeY + snapOffset.y
          });
        }
      } else {
        offsets.push(snapOffset);
      }
  
      return offsets;
    },
  
    set: function set(_ref4) {
      var interaction = _ref4.interaction,
          modifiedCoords = _ref4.modifiedCoords,
          status = _ref4.status,
          options = _ref4.options,
          offsets = _ref4.offset;
  
      var targets = [];
      var target = void 0;
      var page = void 0;
      var i = void 0;
  
      if (status.useStatusXY) {
        page = { x: status.x, y: status.y };
      } else {
        var origin = utils.getOriginXY(interaction.target, interaction.element, interaction.prepared.name);
  
        page = utils.extend({}, modifiedCoords);
  
        page.x -= origin.x;
        page.y -= origin.y;
      }
  
      status.realX = page.x;
      status.realY = page.y;
  
      var len = options.targets ? options.targets.length : 0;
  
      for (var _i2 = 0; _i2 < offsets.length; _i2++) {
        var _ref6;
  
        _ref6 = offsets[_i2];
        var _ref5 = _ref6;
        var offsetX = _ref5.x;
        var offsetY = _ref5.y;
  
        var relativeX = page.x - offsetX;
        var relativeY = page.y - offsetY;
  
        for (var _i3 = 0; _i3 < (options.targets || []).length; _i3++) {
          var _ref7;
  
          _ref7 = (options.targets || [])[_i3];
          var snapTarget = _ref7;
  
          if (utils.is.function(snapTarget)) {
            target = snapTarget(relativeX, relativeY, interaction);
          } else {
            target = snapTarget;
          }
  
          if (!target) {
            continue;
          }
  
          targets.push({
            x: utils.is.number(target.x) ? target.x + offsetX : relativeX,
            y: utils.is.number(target.y) ? target.y + offsetY : relativeY,
  
            range: utils.is.number(target.range) ? target.range : options.range
          });
        }
      }
  
      var closest = {
        target: null,
        inRange: false,
        distance: 0,
        range: 0,
        dx: 0,
        dy: 0
      };
  
      for (i = 0, len = targets.length; i < len; i++) {
        target = targets[i];
  
        var range = target.range;
        var dx = target.x - page.x;
        var dy = target.y - page.y;
        var distance = utils.hypot(dx, dy);
        var inRange = distance <= range;
  
        // Infinite targets count as being out of range
        // compared to non infinite ones that are in range
        if (range === Infinity && closest.inRange && closest.range !== Infinity) {
          inRange = false;
        }
  
        if (!closest.target || (inRange
        // is the closest target in range?
        ? closest.inRange && range !== Infinity
        // the pointer is relatively deeper in this target
        ? distance / range < closest.distance / closest.range
        // this target has Infinite range and the closest doesn't
        : range === Infinity && closest.range !== Infinity ||
        // OR this target is closer that the previous closest
        distance < closest.distance :
        // The other is not in range and the pointer is closer to this target
        !closest.inRange && distance < closest.distance)) {
  
          closest.target = target;
          closest.distance = distance;
          closest.range = range;
          closest.inRange = inRange;
          closest.dx = dx;
          closest.dy = dy;
  
          status.range = range;
        }
      }
  
      var snapChanged = void 0;
  
      if (closest.target) {
        snapChanged = status.modifiedX !== closest.target.x || status.modifiedY !== closest.target.y;
  
        status.modifiedX = closest.target.x;
        status.modifiedY = closest.target.y;
      } else {
        snapChanged = true;
  
        status.modifiedX = NaN;
        status.modifiedY = NaN;
      }
  
      status.dx = closest.dx;
      status.dy = closest.dy;
  
      status.changed = snapChanged || closest.inRange && !status.locked;
      status.locked = closest.inRange;
    },
  
    modifyCoords: function modifyCoords(_ref8) {
      var page = _ref8.page,
          client = _ref8.client,
          status = _ref8.status,
          phase = _ref8.phase,
          options = _ref8.options;
  
      var relativePoints = options && options.relativePoints;
  
      if (options && options.enabled && !(phase === 'start' && relativePoints && relativePoints.length)) {
  
        if (status.locked) {
          page.x += status.dx;
          page.y += status.dy;
          client.x += status.dx;
          client.y += status.dy;
        }
  
        return {
          range: status.range,
          locked: status.locked,
          x: status.modifiedX,
          y: status.modifiedY,
          realX: status.realX,
          realY: status.realY,
          dx: status.dx,
          dy: status.dy
        };
      }
    }
  };
  
  interact.createSnapGrid = function (grid) {
    return function (x, y) {
      var limits = grid.limits || {
        left: -Infinity,
        right: Infinity,
        top: -Infinity,
        bottom: Infinity
      };
      var offsetX = 0;
      var offsetY = 0;
  
      if (utils.is.object(grid.offset)) {
        offsetX = grid.offset.x;
        offsetY = grid.offset.y;
      }
  
      var gridx = Math.round((x - offsetX) / grid.x);
      var gridy = Math.round((y - offsetY) / grid.y);
  
      var newX = Math.max(limits.left, Math.min(limits.right, gridx * grid.x + offsetX));
      var newY = Math.max(limits.top, Math.min(limits.bottom, gridy * grid.y + offsetY));
  
      return {
        x: newX,
        y: newY,
        range: grid.range
      };
    };
  };
  
  modifiers.snap = snap;
  modifiers.names.push('snap');
  
  defaultOptions.perAction.snap = snap.defaults;
  
  module.exports = snap;
  
  },{"../defaultOptions":18,"../interact":21,"../utils":44,"./base":23}],28:[function(require,module,exports){
  'use strict';
  
  // This module allows snapping of the size of targets during resize
  // interactions.
  
  var modifiers = require('./base');
  var snap = require('./snap');
  var defaultOptions = require('../defaultOptions');
  var resize = require('../actions/resize');
  var utils = require('../utils/');
  
  var snapSize = {
    defaults: {
      enabled: false,
      endOnly: false,
      range: Infinity,
      targets: null,
      offsets: null
    },
  
    setOffset: function setOffset(arg) {
      var interaction = arg.interaction,
          options = arg.options;
  
      var edges = interaction.prepared.edges;
  
      if (!edges) {
        return;
      }
  
      arg.options = {
        relativePoints: [{
          x: edges.left ? 0 : 1,
          y: edges.top ? 0 : 1
        }],
        origin: { x: 0, y: 0 },
        offset: 'self',
        range: options.range
      };
  
      var offsets = snap.setOffset(arg);
      arg.options = options;
  
      return offsets;
    },
  
    set: function set(arg) {
      var interaction = arg.interaction,
          options = arg.options,
          offset = arg.offset,
          modifiedCoords = arg.modifiedCoords;
  
      var page = utils.extend({}, modifiedCoords);
      var relativeX = page.x - offset[0].x;
      var relativeY = page.y - offset[0].y;
  
      arg.options = utils.extend({}, options);
      arg.options.targets = [];
  
      for (var _i = 0; _i < (options.targets || []).length; _i++) {
        var _ref;
  
        _ref = (options.targets || [])[_i];
        var snapTarget = _ref;
  
        var target = void 0;
  
        if (utils.is.function(snapTarget)) {
          target = snapTarget(relativeX, relativeY, interaction);
        } else {
          target = snapTarget;
        }
  
        if (!target) {
          continue;
        }
  
        if ('width' in target && 'height' in target) {
          target.x = target.width;
          target.y = target.height;
        }
  
        arg.options.targets.push(target);
      }
  
      snap.set(arg);
    },
  
    modifyCoords: function modifyCoords(arg) {
      var options = arg.options;
  
  
      arg.options = utils.extend({}, options);
      arg.options.enabled = options.enabled;
      arg.options.relativePoints = [null];
  
      snap.modifyCoords(arg);
    }
  };
  
  modifiers.snapSize = snapSize;
  modifiers.names.push('snapSize');
  
  defaultOptions.perAction.snapSize = snapSize.defaults;
  resize.defaults.snapSize = snapSize.defaults;
  
  module.exports = snapSize;
  
  },{"../actions/resize":10,"../defaultOptions":18,"../utils/":44,"./base":23,"./snap":27}],29:[function(require,module,exports){
  'use strict';
  
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  
  var pointerUtils = require('../utils/pointerUtils');
  
  module.exports = function () {
    /** */
    function PointerEvent(type, pointer, event, eventTarget, interaction) {
      _classCallCheck(this, PointerEvent);
  
      pointerUtils.pointerExtend(this, event);
  
      if (event !== pointer) {
        pointerUtils.pointerExtend(this, pointer);
      }
  
      this.interaction = interaction;
  
      this.timeStamp = new Date().getTime();
      this.originalEvent = event;
      this.type = type;
      this.pointerId = pointerUtils.getPointerId(pointer);
      this.pointerType = pointerUtils.getPointerType(pointer);
      this.target = eventTarget;
      this.currentTarget = null;
  
      if (type === 'tap') {
        var pointerIndex = interaction.getPointerIndex(pointer);
        this.dt = this.timeStamp - interaction.downTimes[pointerIndex];
  
        var interval = this.timeStamp - interaction.tapTime;
  
        this.double = !!(interaction.prevTap && interaction.prevTap.type !== 'doubletap' && interaction.prevTap.target === this.target && interval < 500);
      } else if (type === 'doubletap') {
        this.dt = pointer.timeStamp - interaction.tapTime;
      }
    }
  
    PointerEvent.prototype.subtractOrigin = function subtractOrigin(_ref) {
      var originX = _ref.x,
          originY = _ref.y;
  
      this.pageX -= originX;
      this.pageY -= originY;
      this.clientX -= originX;
      this.clientY -= originY;
  
      return this;
    };
  
    PointerEvent.prototype.addOrigin = function addOrigin(_ref2) {
      var originX = _ref2.x,
          originY = _ref2.y;
  
      this.pageX += originX;
      this.pageY += originY;
      this.clientX += originX;
      this.clientY += originY;
  
      return this;
    };
  
    /** */
  
  
    PointerEvent.prototype.preventDefault = function preventDefault() {
      this.originalEvent.preventDefault();
    };
  
    /** */
  
  
    PointerEvent.prototype.stopPropagation = function stopPropagation() {
      this.propagationStopped = true;
    };
  
    /** */
  
  
    PointerEvent.prototype.stopImmediatePropagation = function stopImmediatePropagation() {
      this.immediatePropagationStopped = this.propagationStopped = true;
    };
  
    return PointerEvent;
  }();
  
  },{"../utils/pointerUtils":49}],30:[function(require,module,exports){
  'use strict';
  
  var PointerEvent = require('./PointerEvent');
  var Interaction = require('../Interaction');
  var utils = require('../utils');
  var defaults = require('../defaultOptions');
  var signals = require('../utils/Signals').new();
  
  var simpleSignals = ['down', 'up', 'cancel'];
  var simpleEvents = ['down', 'up', 'cancel'];
  
  var pointerEvents = {
    PointerEvent: PointerEvent,
    fire: fire,
    collectEventTargets: collectEventTargets,
    signals: signals,
    defaults: {
      holdDuration: 600,
      ignoreFrom: null,
      allowFrom: null,
      origin: { x: 0, y: 0 }
    },
    types: ['down', 'move', 'up', 'cancel', 'tap', 'doubletap', 'hold']
  };
  
  function fire(arg) {
    var interaction = arg.interaction,
        pointer = arg.pointer,
        event = arg.event,
        eventTarget = arg.eventTarget,
        _arg$type = arg.type,
        type = _arg$type === undefined ? arg.pointerEvent.type : _arg$type,
        _arg$targets = arg.targets,
        targets = _arg$targets === undefined ? collectEventTargets(arg) : _arg$targets,
        _arg$pointerEvent = arg.pointerEvent,
        pointerEvent = _arg$pointerEvent === undefined ? new PointerEvent(type, pointer, event, eventTarget, interaction) : _arg$pointerEvent;
  
  
    var signalArg = {
      interaction: interaction,
      pointer: pointer,
      event: event,
      eventTarget: eventTarget,
      targets: targets,
      type: type,
      pointerEvent: pointerEvent
    };
  
    for (var i = 0; i < targets.length; i++) {
      var target = targets[i];
  
      for (var prop in target.props || {}) {
        pointerEvent[prop] = target.props[prop];
      }
  
      var origin = utils.getOriginXY(target.eventable, target.element);
  
      pointerEvent.subtractOrigin(origin);
      pointerEvent.eventable = target.eventable;
      pointerEvent.currentTarget = target.element;
  
      target.eventable.fire(pointerEvent);
  
      pointerEvent.addOrigin(origin);
  
      if (pointerEvent.immediatePropagationStopped || pointerEvent.propagationStopped && i + 1 < targets.length && targets[i + 1].element !== pointerEvent.currentTarget) {
        break;
      }
    }
  
    signals.fire('fired', signalArg);
  
    if (type === 'tap') {
      // if pointerEvent should make a double tap, create and fire a doubletap
      // PointerEvent and use that as the prevTap
      var prevTap = pointerEvent.double ? fire({
        interaction: interaction, pointer: pointer, event: event, eventTarget: eventTarget,
        type: 'doubletap'
      }) : pointerEvent;
  
      interaction.prevTap = prevTap;
      interaction.tapTime = prevTap.timeStamp;
    }
  
    return pointerEvent;
  }
  
  function collectEventTargets(_ref) {
    var interaction = _ref.interaction,
        pointer = _ref.pointer,
        event = _ref.event,
        eventTarget = _ref.eventTarget,
        type = _ref.type;
  
    var pointerIndex = interaction.getPointerIndex(pointer);
  
    // do not fire a tap event if the pointer was moved before being lifted
    if (type === 'tap' && (interaction.pointerWasMoved
    // or if the pointerup target is different to the pointerdown target
    || !(interaction.downTargets[pointerIndex] && interaction.downTargets[pointerIndex] === eventTarget))) {
      return [];
    }
  
    var path = utils.getPath(eventTarget);
    var signalArg = {
      interaction: interaction,
      pointer: pointer,
      event: event,
      eventTarget: eventTarget,
      type: type,
      path: path,
      targets: [],
      element: null
    };
  
    for (var _i = 0; _i < path.length; _i++) {
      var _ref2;
  
      _ref2 = path[_i];
      var element = _ref2;
  
      signalArg.element = element;
  
      signals.fire('collect-targets', signalArg);
    }
  
    if (type === 'hold') {
      signalArg.targets = signalArg.targets.filter(function (target) {
        return target.eventable.options.holdDuration === interaction.holdTimers[pointerIndex].duration;
      });
    }
  
    return signalArg.targets;
  }
  
  Interaction.signals.on('update-pointer-down', function (_ref3) {
    var interaction = _ref3.interaction,
        pointerIndex = _ref3.pointerIndex;
  
    interaction.holdTimers[pointerIndex] = { duration: Infinity, timeout: null };
  });
  
  Interaction.signals.on('remove-pointer', function (_ref4) {
    var interaction = _ref4.interaction,
        pointerIndex = _ref4.pointerIndex;
  
    interaction.holdTimers.splice(pointerIndex, 1);
  });
  
  Interaction.signals.on('move', function (_ref5) {
    var interaction = _ref5.interaction,
        pointer = _ref5.pointer,
        event = _ref5.event,
        eventTarget = _ref5.eventTarget,
        duplicateMove = _ref5.duplicateMove;
  
    var pointerIndex = interaction.getPointerIndex(pointer);
  
    if (!duplicateMove && (!interaction.pointerIsDown || interaction.pointerWasMoved)) {
      if (interaction.pointerIsDown) {
        clearTimeout(interaction.holdTimers[pointerIndex].timeout);
      }
  
      fire({
        interaction: interaction, pointer: pointer, event: event, eventTarget: eventTarget,
        type: 'move'
      });
    }
  });
  
  Interaction.signals.on('down', function (_ref6) {
    var interaction = _ref6.interaction,
        pointer = _ref6.pointer,
        event = _ref6.event,
        eventTarget = _ref6.eventTarget,
        pointerIndex = _ref6.pointerIndex;
  
    var timer = interaction.holdTimers[pointerIndex];
    var path = utils.getPath(eventTarget);
    var signalArg = {
      interaction: interaction,
      pointer: pointer,
      event: event,
      eventTarget: eventTarget,
      type: 'hold',
      targets: [],
      path: path,
      element: null
    };
  
    for (var _i2 = 0; _i2 < path.length; _i2++) {
      var _ref7;
  
      _ref7 = path[_i2];
      var element = _ref7;
  
      signalArg.element = element;
  
      signals.fire('collect-targets', signalArg);
    }
  
    if (!signalArg.targets.length) {
      return;
    }
  
    var minDuration = Infinity;
  
    for (var _i3 = 0; _i3 < signalArg.targets.length; _i3++) {
      var _ref8;
  
      _ref8 = signalArg.targets[_i3];
      var target = _ref8;
  
      var holdDuration = target.eventable.options.holdDuration;
  
      if (holdDuration < minDuration) {
        minDuration = holdDuration;
      }
    }
  
    timer.duration = minDuration;
    timer.timeout = setTimeout(function () {
      fire({
        interaction: interaction,
        eventTarget: eventTarget,
        pointer: pointer,
        event: event,
        type: 'hold'
      });
    }, minDuration);
  });
  
  Interaction.signals.on('up', function (_ref9) {
    var interaction = _ref9.interaction,
        pointer = _ref9.pointer,
        event = _ref9.event,
        eventTarget = _ref9.eventTarget;
  
    if (!interaction.pointerWasMoved) {
      fire({ interaction: interaction, eventTarget: eventTarget, pointer: pointer, event: event, type: 'tap' });
    }
  });
  
  var _arr = ['up', 'cancel'];
  for (var _i4 = 0; _i4 < _arr.length; _i4++) {
    var signalName = _arr[_i4];
    Interaction.signals.on(signalName, function (_ref11) {
      var interaction = _ref11.interaction,
          pointerIndex = _ref11.pointerIndex;
  
      if (interaction.holdTimers[pointerIndex]) {
        clearTimeout(interaction.holdTimers[pointerIndex].timeout);
      }
    });
  }
  
  function createSignalListener(type) {
    return function (_ref10) {
      var interaction = _ref10.interaction,
          pointer = _ref10.pointer,
          event = _ref10.event,
          eventTarget = _ref10.eventTarget;
  
      fire({ interaction: interaction, eventTarget: eventTarget, pointer: pointer, event: event, type: type });
    };
  }
  
  for (var i = 0; i < simpleSignals.length; i++) {
    Interaction.signals.on(simpleSignals[i], createSignalListener(simpleEvents[i]));
  }
  
  Interaction.signals.on('new', function (interaction) {
    interaction.prevTap = null; // the most recent tap event on this interaction
    interaction.tapTime = 0; // time of the most recent tap event
    interaction.holdTimers = []; // [{ duration, timeout }]
  });
  
  defaults.pointerEvents = pointerEvents.defaults;
  module.exports = pointerEvents;
  
  },{"../Interaction":5,"../defaultOptions":18,"../utils":44,"../utils/Signals":34,"./PointerEvent":29}],31:[function(require,module,exports){
  'use strict';
  
  var pointerEvents = require('./base');
  var Interaction = require('../Interaction');
  
  pointerEvents.signals.on('new', onNew);
  pointerEvents.signals.on('fired', onFired);
  
  var _arr = ['move', 'up', 'cancel', 'endall'];
  for (var _i = 0; _i < _arr.length; _i++) {
    var signal = _arr[_i];
    Interaction.signals.on(signal, endHoldRepeat);
  }
  
  function onNew(_ref) {
    var pointerEvent = _ref.pointerEvent;
  
    if (pointerEvent.type !== 'hold') {
      return;
    }
  
    pointerEvent.count = (pointerEvent.count || 0) + 1;
  }
  
  function onFired(_ref2) {
    var interaction = _ref2.interaction,
        pointerEvent = _ref2.pointerEvent,
        eventTarget = _ref2.eventTarget,
        targets = _ref2.targets;
  
    if (pointerEvent.type !== 'hold' || !targets.length) {
      return;
    }
  
    // get the repeat interval from the first eventable
    var interval = targets[0].eventable.options.holdRepeatInterval;
  
    // don't repeat if the interval is 0 or less
    if (interval <= 0) {
      return;
    }
  
    // set a timeout to fire the holdrepeat event
    interaction.holdIntervalHandle = setTimeout(function () {
      pointerEvents.fire({
        interaction: interaction,
        eventTarget: eventTarget,
        type: 'hold',
        pointer: pointerEvent,
        event: pointerEvent
      });
    }, interval);
  }
  
  function endHoldRepeat(_ref3) {
    var interaction = _ref3.interaction;
  
    // set the interaction's holdStopTime property
    // to stop further holdRepeat events
    if (interaction.holdIntervalHandle) {
      clearInterval(interaction.holdIntervalHandle);
      interaction.holdIntervalHandle = null;
    }
  }
  
  // don't repeat by default
  pointerEvents.defaults.holdRepeatInterval = 0;
  pointerEvents.types.push('holdrepeat');
  
  module.exports = {
    onNew: onNew,
    onFired: onFired,
    endHoldRepeat: endHoldRepeat
  };
  
  },{"../Interaction":5,"./base":30}],32:[function(require,module,exports){
  'use strict';
  
  var pointerEvents = require('./base');
  var Interactable = require('../Interactable');
  var is = require('../utils/is');
  var scope = require('../scope');
  var extend = require('../utils/extend');
  
  var _require = require('../utils/arr'),
      merge = _require.merge;
  
  pointerEvents.signals.on('collect-targets', function (_ref) {
    var targets = _ref.targets,
        element = _ref.element,
        type = _ref.type,
        eventTarget = _ref.eventTarget;
  
    scope.interactables.forEachMatch(element, function (interactable) {
      var eventable = interactable.events;
      var options = eventable.options;
  
      if (eventable[type] && is.element(element) && interactable.testIgnoreAllow(options, element, eventTarget)) {
  
        targets.push({
          element: element,
          eventable: eventable,
          props: { interactable: interactable }
        });
      }
    });
  });
  
  Interactable.signals.on('new', function (_ref2) {
    var interactable = _ref2.interactable;
  
    interactable.events.getRect = function (element) {
      return interactable.getRect(element);
    };
  });
  
  Interactable.signals.on('set', function (_ref3) {
    var interactable = _ref3.interactable,
        options = _ref3.options;
  
    extend(interactable.events.options, pointerEvents.defaults);
    extend(interactable.events.options, options);
  });
  
  merge(Interactable.eventTypes, pointerEvents.types);
  
  Interactable.prototype.pointerEvents = function (options) {
    extend(this.events.options, options);
  
    return this;
  };
  
  var __backCompatOption = Interactable.prototype._backCompatOption;
  
  Interactable.prototype._backCompatOption = function (optionName, newValue) {
    var ret = __backCompatOption.call(this, optionName, newValue);
  
    if (ret === this) {
      this.events.options[optionName] = newValue;
    }
  
    return ret;
  };
  
  Interactable.settingsMethods.push('pointerEvents');
  
  },{"../Interactable":4,"../scope":33,"../utils/arr":35,"../utils/extend":41,"../utils/is":46,"./base":30}],33:[function(require,module,exports){
  'use strict';
  
  var utils = require('./utils');
  var events = require('./utils/events');
  var signals = require('./utils/Signals').new();
  
  var _require = require('./utils/window'),
      getWindow = _require.getWindow;
  
  var scope = {
    signals: signals,
    events: events,
    utils: utils,
  
    // main document
    document: require('./utils/domObjects').document,
    // all documents being listened to
    documents: [],
  
    addDocument: function addDocument(doc, win) {
      // do nothing if document is already known
      if (utils.contains(scope.documents, doc)) {
        return false;
      }
  
      win = win || getWindow(doc);
  
      scope.documents.push(doc);
      events.documents.push(doc);
  
      // don't add an unload event for the main document
      // so that the page may be cached in browser history
      if (doc !== scope.document) {
        events.add(win, 'unload', scope.onWindowUnload);
      }
  
      signals.fire('add-document', { doc: doc, win: win });
    },
  
    removeDocument: function removeDocument(doc, win) {
      var index = scope.documents.indexOf(doc);
  
      win = win || getWindow(doc);
  
      events.remove(win, 'unload', scope.onWindowUnload);
  
      scope.documents.splice(index, 1);
      events.documents.splice(index, 1);
  
      signals.fire('remove-document', { win: win, doc: doc });
    },
  
    onWindowUnload: function onWindowUnload() {
      scope.removeDocument(this.document, this);
    }
  };
  
  module.exports = scope;
  
  },{"./utils":44,"./utils/Signals":34,"./utils/domObjects":38,"./utils/events":40,"./utils/window":52}],34:[function(require,module,exports){
  "use strict";
  
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  
  var Signals = function () {
    function Signals() {
      _classCallCheck(this, Signals);
  
      this.listeners = {
        // signalName: [listeners],
      };
    }
  
    Signals.prototype.on = function on(name, listener) {
      if (!this.listeners[name]) {
        this.listeners[name] = [listener];
        return;
      }
  
      this.listeners[name].push(listener);
    };
  
    Signals.prototype.off = function off(name, listener) {
      if (!this.listeners[name]) {
        return;
      }
  
      var index = this.listeners[name].indexOf(listener);
  
      if (index !== -1) {
        this.listeners[name].splice(index, 1);
      }
    };
  
    Signals.prototype.fire = function fire(name, arg) {
      var targetListeners = this.listeners[name];
  
      if (!targetListeners) {
        return;
      }
  
      for (var _i = 0; _i < targetListeners.length; _i++) {
        var _ref;
  
        _ref = targetListeners[_i];
        var listener = _ref;
  
        if (listener(arg, name) === false) {
          return;
        }
      }
    };
  
    return Signals;
  }();
  
  Signals.new = function () {
    return new Signals();
  };
  
  module.exports = Signals;
  
  },{}],35:[function(require,module,exports){
  "use strict";
  
  function contains(array, target) {
    return array.indexOf(target) !== -1;
  }
  
  function merge(target, source) {
    for (var _i = 0; _i < source.length; _i++) {
      var _ref;
  
      _ref = source[_i];
      var item = _ref;
  
      target.push(item);
    }
  
    return target;
  }
  
  module.exports = {
    contains: contains,
    merge: merge
  };
  
  },{}],36:[function(require,module,exports){
  'use strict';
  
  var _require = require('./window'),
      window = _require.window;
  
  var is = require('./is');
  var domObjects = require('./domObjects');
  
  var Element = domObjects.Element;
  var navigator = window.navigator;
  
  var browser = {
    // Does the browser support touch input?
    supportsTouch: !!('ontouchstart' in window || is.function(window.DocumentTouch) && domObjects.document instanceof window.DocumentTouch),
  
    // Does the browser support PointerEvents
    supportsPointerEvent: !!domObjects.PointerEvent,
  
    isIOS: /iP(hone|od|ad)/.test(navigator.platform),
  
    // scrolling doesn't change the result of getClientRects on iOS 7
    isIOS7: /iP(hone|od|ad)/.test(navigator.platform) && /OS 7[^\d]/.test(navigator.appVersion),
  
    isIe9: /MSIE 9/.test(navigator.userAgent),
  
    // prefix matchesSelector
    prefixedMatchesSelector: 'matches' in Element.prototype ? 'matches' : 'webkitMatchesSelector' in Element.prototype ? 'webkitMatchesSelector' : 'mozMatchesSelector' in Element.prototype ? 'mozMatchesSelector' : 'oMatchesSelector' in Element.prototype ? 'oMatchesSelector' : 'msMatchesSelector',
  
    pEventTypes: domObjects.PointerEvent ? domObjects.PointerEvent === window.MSPointerEvent ? {
      up: 'MSPointerUp',
      down: 'MSPointerDown',
      over: 'mouseover',
      out: 'mouseout',
      move: 'MSPointerMove',
      cancel: 'MSPointerCancel'
    } : {
      up: 'pointerup',
      down: 'pointerdown',
      over: 'pointerover',
      out: 'pointerout',
      move: 'pointermove',
      cancel: 'pointercancel'
    } : null,
  
    // because Webkit and Opera still use 'mousewheel' event type
    wheelEvent: 'onmousewheel' in domObjects.document ? 'mousewheel' : 'wheel'
  
  };
  
  // Opera Mobile must be handled differently
  browser.isOperaMobile = navigator.appName === 'Opera' && browser.supportsTouch && navigator.userAgent.match('Presto');
  
  module.exports = browser;
  
  },{"./domObjects":38,"./is":46,"./window":52}],37:[function(require,module,exports){
  'use strict';
  
  var is = require('./is');
  
  module.exports = function clone(source) {
    var dest = {};
    for (var prop in source) {
      if (is.plainObject(source[prop])) {
        dest[prop] = clone(source[prop]);
      } else {
        dest[prop] = source[prop];
      }
    }
    return dest;
  };
  
  },{"./is":46}],38:[function(require,module,exports){
  'use strict';
  
  var domObjects = {};
  var win = require('./window').window;
  
  function blank() {}
  
  domObjects.document = win.document;
  domObjects.DocumentFragment = win.DocumentFragment || blank;
  domObjects.SVGElement = win.SVGElement || blank;
  domObjects.SVGSVGElement = win.SVGSVGElement || blank;
  domObjects.SVGElementInstance = win.SVGElementInstance || blank;
  domObjects.Element = win.Element || blank;
  domObjects.HTMLElement = win.HTMLElement || domObjects.Element;
  
  domObjects.Event = win.Event;
  domObjects.Touch = win.Touch || blank;
  domObjects.PointerEvent = win.PointerEvent || win.MSPointerEvent;
  
  module.exports = domObjects;
  
  },{"./window":52}],39:[function(require,module,exports){
  'use strict';
  
  var win = require('./window');
  var browser = require('./browser');
  var is = require('./is');
  var domObjects = require('./domObjects');
  
  var domUtils = {
    nodeContains: function nodeContains(parent, child) {
      while (child) {
        if (child === parent) {
          return true;
        }
  
        child = child.parentNode;
      }
  
      return false;
    },
  
    closest: function closest(element, selector) {
      while (is.element(element)) {
        if (domUtils.matchesSelector(element, selector)) {
          return element;
        }
  
        element = domUtils.parentNode(element);
      }
  
      return null;
    },
  
    parentNode: function parentNode(node) {
      var parent = node.parentNode;
  
      if (is.docFrag(parent)) {
        // skip past #shado-root fragments
        while ((parent = parent.host) && is.docFrag(parent)) {
          continue;
        }
  
        return parent;
      }
  
      return parent;
    },
  
    matchesSelector: function matchesSelector(element, selector) {
      // remove /deep/ from selectors if shadowDOM polyfill is used
      if (win.window !== win.realWindow) {
        selector = selector.replace(/\/deep\//g, ' ');
      }
  
      return element[browser.prefixedMatchesSelector](selector);
    },
  
    // Test for the element that's "above" all other qualifiers
    indexOfDeepestElement: function indexOfDeepestElement(elements) {
      var deepestZoneParents = [];
      var dropzoneParents = [];
      var dropzone = void 0;
      var deepestZone = elements[0];
      var index = deepestZone ? 0 : -1;
      var parent = void 0;
      var child = void 0;
      var i = void 0;
      var n = void 0;
  
      for (i = 1; i < elements.length; i++) {
        dropzone = elements[i];
  
        // an element might belong to multiple selector dropzones
        if (!dropzone || dropzone === deepestZone) {
          continue;
        }
  
        if (!deepestZone) {
          deepestZone = dropzone;
          index = i;
          continue;
        }
  
        // check if the deepest or current are document.documentElement or document.rootElement
        // - if the current dropzone is, do nothing and continue
        if (dropzone.parentNode === dropzone.ownerDocument) {
          continue;
        }
        // - if deepest is, update with the current dropzone and continue to next
        else if (deepestZone.parentNode === dropzone.ownerDocument) {
            deepestZone = dropzone;
            index = i;
            continue;
          }
  
        if (!deepestZoneParents.length) {
          parent = deepestZone;
          while (parent.parentNode && parent.parentNode !== parent.ownerDocument) {
            deepestZoneParents.unshift(parent);
            parent = parent.parentNode;
          }
        }
  
        // if this element is an svg element and the current deepest is
        // an HTMLElement
        if (deepestZone instanceof domObjects.HTMLElement && dropzone instanceof domObjects.SVGElement && !(dropzone instanceof domObjects.SVGSVGElement)) {
  
          if (dropzone === deepestZone.parentNode) {
            continue;
          }
  
          parent = dropzone.ownerSVGElement;
        } else {
          parent = dropzone;
        }
  
        dropzoneParents = [];
  
        while (parent.parentNode !== parent.ownerDocument) {
          dropzoneParents.unshift(parent);
          parent = parent.parentNode;
        }
  
        n = 0;
  
        // get (position of last common ancestor) + 1
        while (dropzoneParents[n] && dropzoneParents[n] === deepestZoneParents[n]) {
          n++;
        }
  
        var parents = [dropzoneParents[n - 1], dropzoneParents[n], deepestZoneParents[n]];
  
        child = parents[0].lastChild;
  
        while (child) {
          if (child === parents[1]) {
            deepestZone = dropzone;
            index = i;
            deepestZoneParents = [];
  
            break;
          } else if (child === parents[2]) {
            break;
          }
  
          child = child.previousSibling;
        }
      }
  
      return index;
    },
  
    matchesUpTo: function matchesUpTo(element, selector, limit) {
      while (is.element(element)) {
        if (domUtils.matchesSelector(element, selector)) {
          return true;
        }
  
        element = domUtils.parentNode(element);
  
        if (element === limit) {
          return domUtils.matchesSelector(element, selector);
        }
      }
  
      return false;
    },
  
    getActualElement: function getActualElement(element) {
      return element instanceof domObjects.SVGElementInstance ? element.correspondingUseElement : element;
    },
  
    getScrollXY: function getScrollXY(relevantWindow) {
      relevantWindow = relevantWindow || win.window;
      return {
        x: relevantWindow.scrollX || relevantWindow.document.documentElement.scrollLeft,
        y: relevantWindow.scrollY || relevantWindow.document.documentElement.scrollTop
      };
    },
  
    getElementClientRect: function getElementClientRect(element) {
      var clientRect = element instanceof domObjects.SVGElement ? element.getBoundingClientRect() : element.getClientRects()[0];
  
      return clientRect && {
        left: clientRect.left,
        right: clientRect.right,
        top: clientRect.top,
        bottom: clientRect.bottom,
        width: clientRect.width || clientRect.right - clientRect.left,
        height: clientRect.height || clientRect.bottom - clientRect.top
      };
    },
  
    getElementRect: function getElementRect(element) {
      var clientRect = domUtils.getElementClientRect(element);
  
      if (!browser.isIOS7 && clientRect) {
        var scroll = domUtils.getScrollXY(win.getWindow(element));
  
        clientRect.left += scroll.x;
        clientRect.right += scroll.x;
        clientRect.top += scroll.y;
        clientRect.bottom += scroll.y;
      }
  
      return clientRect;
    },
  
    getPath: function getPath(element) {
      var path = [];
  
      while (element) {
        path.push(element);
        element = domUtils.parentNode(element);
      }
  
      return path;
    },
  
    trySelector: function trySelector(value) {
      if (!is.string(value)) {
        return false;
      }
  
      // an exception will be raised if it is invalid
      domObjects.document.querySelector(value);
      return true;
    }
  };
  
  module.exports = domUtils;
  
  },{"./browser":36,"./domObjects":38,"./is":46,"./window":52}],40:[function(require,module,exports){
  'use strict';
  
  var is = require('./is');
  var domUtils = require('./domUtils');
  var pointerUtils = require('./pointerUtils');
  var pExtend = require('./pointerExtend');
  
  var _require = require('./window'),
      window = _require.window;
  
  var _require2 = require('./arr'),
      contains = _require2.contains;
  
  var elements = [];
  var targets = [];
  
  // {
  //   type: {
  //     selectors: ['selector', ...],
  //     contexts : [document, ...],
  //     listeners: [[listener, capture, passive], ...]
  //   }
  //  }
  var delegatedEvents = {};
  var documents = [];
  
  var supportsOptions = function () {
    var supported = false;
  
    window.document.createElement('div').addEventListener('test', null, {
      get capture() {
        supported = true;
      }
    });
  
    return supported;
  }();
  
  function add(element, type, listener, optionalArg) {
    var options = getOptions(optionalArg);
    var elementIndex = elements.indexOf(element);
    var target = targets[elementIndex];
  
    if (!target) {
      target = {
        events: {},
        typeCount: 0
      };
  
      elementIndex = elements.push(element) - 1;
      targets.push(target);
    }
  
    if (!target.events[type]) {
      target.events[type] = [];
      target.typeCount++;
    }
  
    if (!contains(target.events[type], listener)) {
      element.addEventListener(type, listener, supportsOptions ? options : !!options.capture);
      target.events[type].push(listener);
    }
  }
  
  function remove(element, type, listener, optionalArg) {
    var options = getOptions(optionalArg);
    var elementIndex = elements.indexOf(element);
    var target = targets[elementIndex];
  
    if (!target || !target.events) {
      return;
    }
  
    if (type === 'all') {
      for (type in target.events) {
        if (target.events.hasOwnProperty(type)) {
          remove(element, type, 'all');
        }
      }
      return;
    }
  
    if (target.events[type]) {
      var len = target.events[type].length;
  
      if (listener === 'all') {
        for (var i = 0; i < len; i++) {
          remove(element, type, target.events[type][i], options);
        }
        return;
      } else {
        for (var _i = 0; _i < len; _i++) {
          if (target.events[type][_i] === listener) {
            element.removeEventListener('on' + type, listener, supportsOptions ? options : !!options.capture);
            target.events[type].splice(_i, 1);
  
            break;
          }
        }
      }
  
      if (target.events[type] && target.events[type].length === 0) {
        target.events[type] = null;
        target.typeCount--;
      }
    }
  
    if (!target.typeCount) {
      targets.splice(elementIndex, 1);
      elements.splice(elementIndex, 1);
    }
  }
  
  function addDelegate(selector, context, type, listener, optionalArg) {
    var options = getOptions(optionalArg);
    if (!delegatedEvents[type]) {
      delegatedEvents[type] = {
        selectors: [],
        contexts: [],
        listeners: []
      };
  
      // add delegate listener functions
      for (var _i2 = 0; _i2 < documents.length; _i2++) {
        var doc = documents[_i2];
        add(doc, type, delegateListener);
        add(doc, type, delegateUseCapture, true);
      }
    }
  
    var delegated = delegatedEvents[type];
    var index = void 0;
  
    for (index = delegated.selectors.length - 1; index >= 0; index--) {
      if (delegated.selectors[index] === selector && delegated.contexts[index] === context) {
        break;
      }
    }
  
    if (index === -1) {
      index = delegated.selectors.length;
  
      delegated.selectors.push(selector);
      delegated.contexts.push(context);
      delegated.listeners.push([]);
    }
  
    // keep listener and capture and passive flags
    delegated.listeners[index].push([listener, !!options.capture, options.passive]);
  }
  
  function removeDelegate(selector, context, type, listener, optionalArg) {
    var options = getOptions(optionalArg);
    var delegated = delegatedEvents[type];
    var matchFound = false;
    var index = void 0;
  
    if (!delegated) {
      return;
    }
  
    // count from last index of delegated to 0
    for (index = delegated.selectors.length - 1; index >= 0; index--) {
      // look for matching selector and context Node
      if (delegated.selectors[index] === selector && delegated.contexts[index] === context) {
  
        var listeners = delegated.listeners[index];
  
        // each item of the listeners array is an array: [function, capture, passive]
        for (var i = listeners.length - 1; i >= 0; i--) {
          var _listeners$i = listeners[i],
              fn = _listeners$i[0],
              capture = _listeners$i[1],
              passive = _listeners$i[2];
  
          // check if the listener functions and capture and passive flags match
  
          if (fn === listener && capture === !!options.capture && passive === options.passive) {
            // remove the listener from the array of listeners
            listeners.splice(i, 1);
  
            // if all listeners for this interactable have been removed
            // remove the interactable from the delegated arrays
            if (!listeners.length) {
              delegated.selectors.splice(index, 1);
              delegated.contexts.splice(index, 1);
              delegated.listeners.splice(index, 1);
  
              // remove delegate function from context
              remove(context, type, delegateListener);
              remove(context, type, delegateUseCapture, true);
  
              // remove the arrays if they are empty
              if (!delegated.selectors.length) {
                delegatedEvents[type] = null;
              }
            }
  
            // only remove one listener
            matchFound = true;
            break;
          }
        }
  
        if (matchFound) {
          break;
        }
      }
    }
  }
  
  // bound to the interactable context when a DOM event
  // listener is added to a selector interactable
  function delegateListener(event, optionalArg) {
    var options = getOptions(optionalArg);
    var fakeEvent = {};
    var delegated = delegatedEvents[event.type];
  
    var _pointerUtils$getEven = pointerUtils.getEventTargets(event),
        eventTarget = _pointerUtils$getEven[0];
  
    var element = eventTarget;
  
    // duplicate the event so that currentTarget can be changed
    pExtend(fakeEvent, event);
  
    fakeEvent.originalEvent = event;
    fakeEvent.preventDefault = preventOriginalDefault;
  
    // climb up document tree looking for selector matches
    while (is.element(element)) {
      for (var i = 0; i < delegated.selectors.length; i++) {
        var selector = delegated.selectors[i];
        var context = delegated.contexts[i];
  
        if (domUtils.matchesSelector(element, selector) && domUtils.nodeContains(context, eventTarget) && domUtils.nodeContains(context, element)) {
  
          var listeners = delegated.listeners[i];
  
          fakeEvent.currentTarget = element;
  
          for (var j = 0; j < listeners.length; j++) {
            var _listeners$j = listeners[j],
                fn = _listeners$j[0],
                capture = _listeners$j[1],
                passive = _listeners$j[2];
  
  
            if (capture === !!options.capture && passive === options.passive) {
              fn(fakeEvent);
            }
          }
        }
      }
  
      element = domUtils.parentNode(element);
    }
  }
  
  function delegateUseCapture(event) {
    return delegateListener.call(this, event, true);
  }
  
  function preventOriginalDefault() {
    this.originalEvent.preventDefault();
  }
  
  function getOptions(param) {
    return is.object(param) ? param : { capture: param };
  }
  
  module.exports = {
    add: add,
    remove: remove,
  
    addDelegate: addDelegate,
    removeDelegate: removeDelegate,
  
    delegateListener: delegateListener,
    delegateUseCapture: delegateUseCapture,
    delegatedEvents: delegatedEvents,
    documents: documents,
  
    supportsOptions: supportsOptions,
  
    _elements: elements,
    _targets: targets
  };
  
  },{"./arr":35,"./domUtils":39,"./is":46,"./pointerExtend":48,"./pointerUtils":49,"./window":52}],41:[function(require,module,exports){
  "use strict";
  
  module.exports = function extend(dest, source) {
    for (var prop in source) {
      dest[prop] = source[prop];
    }
    return dest;
  };
  
  },{}],42:[function(require,module,exports){
  'use strict';
  
  var _require = require('./rect'),
      resolveRectLike = _require.resolveRectLike,
      rectToXY = _require.rectToXY;
  
  module.exports = function (target, element, action) {
    var actionOptions = target.options[action];
    var actionOrigin = actionOptions && actionOptions.origin;
    var origin = actionOrigin || target.options.origin;
  
    var originRect = resolveRectLike(origin, target, element, [target && element]);
  
    return rectToXY(originRect) || { x: 0, y: 0 };
  };
  
  },{"./rect":51}],43:[function(require,module,exports){
  "use strict";
  
  module.exports = function (x, y) {
    return Math.sqrt(x * x + y * y);
  };
  
  },{}],44:[function(require,module,exports){
  'use strict';
  
  var extend = require('./extend');
  var win = require('./window');
  
  var utils = {
    warnOnce: function warnOnce(method, message) {
      var warned = false;
  
      return function () {
        if (!warned) {
          win.window.console.warn(message);
          warned = true;
        }
  
        return method.apply(this, arguments);
      };
    },
  
    // http://stackoverflow.com/a/5634528/2280888
    _getQBezierValue: function _getQBezierValue(t, p1, p2, p3) {
      var iT = 1 - t;
      return iT * iT * p1 + 2 * iT * t * p2 + t * t * p3;
    },
  
    getQuadraticCurvePoint: function getQuadraticCurvePoint(startX, startY, cpX, cpY, endX, endY, position) {
      return {
        x: utils._getQBezierValue(position, startX, cpX, endX),
        y: utils._getQBezierValue(position, startY, cpY, endY)
      };
    },
  
    // http://gizma.com/easing/
    easeOutQuad: function easeOutQuad(t, b, c, d) {
      t /= d;
      return -c * t * (t - 2) + b;
    },
  
    copyAction: function copyAction(dest, src) {
      dest.name = src.name;
      dest.axis = src.axis;
      dest.edges = src.edges;
  
      return dest;
    },
  
    is: require('./is'),
    extend: extend,
    hypot: require('./hypot'),
    getOriginXY: require('./getOriginXY')
  };
  
  extend(utils, require('./arr'));
  extend(utils, require('./domUtils'));
  extend(utils, require('./pointerUtils'));
  extend(utils, require('./rect'));
  
  module.exports = utils;
  
  },{"./arr":35,"./domUtils":39,"./extend":41,"./getOriginXY":42,"./hypot":43,"./is":46,"./pointerUtils":49,"./rect":51,"./window":52}],45:[function(require,module,exports){
  'use strict';
  
  var scope = require('../scope');
  var utils = require('./index');
  
  var finder = {
    methodOrder: ['simulationResume', 'mouseOrPen', 'hasPointer', 'idle'],
  
    search: function search(pointer, eventType, eventTarget) {
      var pointerType = utils.getPointerType(pointer);
      var pointerId = utils.getPointerId(pointer);
      var details = { pointer: pointer, pointerId: pointerId, pointerType: pointerType, eventType: eventType, eventTarget: eventTarget };
  
      for (var _i = 0; _i < finder.methodOrder.length; _i++) {
        var _ref;
  
        _ref = finder.methodOrder[_i];
        var method = _ref;
  
        var interaction = finder[method](details);
  
        if (interaction) {
          return interaction;
        }
      }
    },
  
    // try to resume simulation with a new pointer
    simulationResume: function simulationResume(_ref2) {
      var pointerType = _ref2.pointerType,
          eventType = _ref2.eventType,
          eventTarget = _ref2.eventTarget;
  
      if (!/down|start/i.test(eventType)) {
        return null;
      }
  
      for (var _i2 = 0; _i2 < scope.interactions.length; _i2++) {
        var _ref3;
  
        _ref3 = scope.interactions[_i2];
        var interaction = _ref3;
  
        var element = eventTarget;
  
        if (interaction.simulation && interaction.simulation.allowResume && interaction.pointerType === pointerType) {
          while (element) {
            // if the element is the interaction element
            if (element === interaction.element) {
              return interaction;
            }
            element = utils.parentNode(element);
          }
        }
      }
  
      return null;
    },
  
    // if it's a mouse or pen interaction
    mouseOrPen: function mouseOrPen(_ref4) {
      var pointerId = _ref4.pointerId,
          pointerType = _ref4.pointerType,
          eventType = _ref4.eventType;
  
      if (pointerType !== 'mouse' && pointerType !== 'pen') {
        return null;
      }
  
      var firstNonActive = void 0;
  
      for (var _i3 = 0; _i3 < scope.interactions.length; _i3++) {
        var _ref5;
  
        _ref5 = scope.interactions[_i3];
        var interaction = _ref5;
  
        if (interaction.pointerType === pointerType) {
          // if it's a down event, skip interactions with running simulations
          if (interaction.simulation && !utils.contains(interaction.pointerIds, pointerId)) {
            continue;
          }
  
          // if the interaction is active, return it immediately
          if (interaction.interacting()) {
            return interaction;
          }
          // otherwise save it and look for another active interaction
          else if (!firstNonActive) {
              firstNonActive = interaction;
            }
        }
      }
  
      // if no active mouse interaction was found use the first inactive mouse
      // interaction
      if (firstNonActive) {
        return firstNonActive;
      }
  
      // find any mouse or pen interaction.
      // ignore the interaction if the eventType is a *down, and a simulation
      // is active
      for (var _i4 = 0; _i4 < scope.interactions.length; _i4++) {
        var _ref6;
  
        _ref6 = scope.interactions[_i4];
        var _interaction = _ref6;
  
        if (_interaction.pointerType === pointerType && !(/down/i.test(eventType) && _interaction.simulation)) {
          return _interaction;
        }
      }
  
      return null;
    },
  
    // get interaction that has this pointer
    hasPointer: function hasPointer(_ref7) {
      var pointerId = _ref7.pointerId;
  
      for (var _i5 = 0; _i5 < scope.interactions.length; _i5++) {
        var _ref8;
  
        _ref8 = scope.interactions[_i5];
        var interaction = _ref8;
  
        if (utils.contains(interaction.pointerIds, pointerId)) {
          return interaction;
        }
      }
    },
  
    // get first idle interaction with a matching pointerType
    idle: function idle(_ref9) {
      var pointerType = _ref9.pointerType;
  
      for (var _i6 = 0; _i6 < scope.interactions.length; _i6++) {
        var _ref10;
  
        _ref10 = scope.interactions[_i6];
        var interaction = _ref10;
  
        // if there's already a pointer held down
        if (interaction.pointerIds.length === 1) {
          var target = interaction.target;
          // don't add this pointer if there is a target interactable and it
          // isn't gesturable
          if (target && !target.options.gesture.enabled) {
            continue;
          }
        }
        // maximum of 2 pointers per interaction
        else if (interaction.pointerIds.length >= 2) {
            continue;
          }
  
        if (!interaction.interacting() && pointerType === interaction.pointerType) {
          return interaction;
        }
      }
  
      return null;
    }
  };
  
  module.exports = finder;
  
  },{"../scope":33,"./index":44}],46:[function(require,module,exports){
  'use strict';
  
  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  
  var win = require('./window');
  var isWindow = require('./isWindow');
  
  var is = {
    array: function array() {},
  
    window: function window(thing) {
      return thing === win.window || isWindow(thing);
    },
  
    docFrag: function docFrag(thing) {
      return is.object(thing) && thing.nodeType === 11;
    },
  
    object: function object(thing) {
      return !!thing && (typeof thing === 'undefined' ? 'undefined' : _typeof(thing)) === 'object';
    },
  
    function: function _function(thing) {
      return typeof thing === 'function';
    },
  
    number: function number(thing) {
      return typeof thing === 'number';
    },
  
    bool: function bool(thing) {
      return typeof thing === 'boolean';
    },
  
    string: function string(thing) {
      return typeof thing === 'string';
    },
  
    element: function element(thing) {
      if (!thing || (typeof thing === 'undefined' ? 'undefined' : _typeof(thing)) !== 'object') {
        return false;
      }
  
      var _window = win.getWindow(thing) || win.window;
  
      return (/object|function/.test(_typeof(_window.Element)) ? thing instanceof _window.Element //DOM2
        : thing.nodeType === 1 && typeof thing.nodeName === 'string'
      );
    },
  
    plainObject: function plainObject(thing) {
      return is.object(thing) && thing.constructor.name === 'Object';
    }
  };
  
  is.array = function (thing) {
    return is.object(thing) && typeof thing.length !== 'undefined' && is.function(thing.splice);
  };
  
  module.exports = is;
  
  },{"./isWindow":47,"./window":52}],47:[function(require,module,exports){
  "use strict";
  
  module.exports = function (thing) {
    return !!(thing && thing.Window) && thing instanceof thing.Window;
  };
  
  },{}],48:[function(require,module,exports){
  'use strict';
  
  function pointerExtend(dest, source) {
    for (var prop in source) {
      var prefixedPropREs = module.exports.prefixedPropREs;
      var deprecated = false;
  
      // skip deprecated prefixed properties
      for (var vendor in prefixedPropREs) {
        if (prop.indexOf(vendor) === 0 && prefixedPropREs[vendor].test(prop)) {
          deprecated = true;
          break;
        }
      }
  
      if (!deprecated && typeof source[prop] !== 'function') {
        dest[prop] = source[prop];
      }
    }
    return dest;
  }
  
  pointerExtend.prefixedPropREs = {
    webkit: /(Movement[XY]|Radius[XY]|RotationAngle|Force)$/
  };
  
  module.exports = pointerExtend;
  
  },{}],49:[function(require,module,exports){
  'use strict';
  
  var hypot = require('./hypot');
  var browser = require('./browser');
  var dom = require('./domObjects');
  var domUtils = require('./domUtils');
  var domObjects = require('./domObjects');
  var is = require('./is');
  var pointerExtend = require('./pointerExtend');
  
  var pointerUtils = {
    copyCoords: function copyCoords(dest, src) {
      dest.page = dest.page || {};
      dest.page.x = src.page.x;
      dest.page.y = src.page.y;
  
      dest.client = dest.client || {};
      dest.client.x = src.client.x;
      dest.client.y = src.client.y;
  
      dest.timeStamp = src.timeStamp;
    },
  
    setCoordDeltas: function setCoordDeltas(targetObj, prev, cur) {
      targetObj.page.x = cur.page.x - prev.page.x;
      targetObj.page.y = cur.page.y - prev.page.y;
      targetObj.client.x = cur.client.x - prev.client.x;
      targetObj.client.y = cur.client.y - prev.client.y;
      targetObj.timeStamp = cur.timeStamp - prev.timeStamp;
  
      // set pointer velocity
      var dt = Math.max(targetObj.timeStamp / 1000, 0.001);
  
      targetObj.page.speed = hypot(targetObj.page.x, targetObj.page.y) / dt;
      targetObj.page.vx = targetObj.page.x / dt;
      targetObj.page.vy = targetObj.page.y / dt;
  
      targetObj.client.speed = hypot(targetObj.client.x, targetObj.page.y) / dt;
      targetObj.client.vx = targetObj.client.x / dt;
      targetObj.client.vy = targetObj.client.y / dt;
    },
  
    isNativePointer: function isNativePointer(pointer) {
      return pointer instanceof dom.Event || pointer instanceof dom.Touch;
    },
  
    // Get specified X/Y coords for mouse or event.touches[0]
    getXY: function getXY(type, pointer, xy) {
      xy = xy || {};
      type = type || 'page';
  
      xy.x = pointer[type + 'X'];
      xy.y = pointer[type + 'Y'];
  
      return xy;
    },
  
    getPageXY: function getPageXY(pointer, page) {
      page = page || {};
  
      // Opera Mobile handles the viewport and scrolling oddly
      if (browser.isOperaMobile && pointerUtils.isNativePointer(pointer)) {
        pointerUtils.getXY('screen', pointer, page);
  
        page.x += window.scrollX;
        page.y += window.scrollY;
      } else {
        pointerUtils.getXY('page', pointer, page);
      }
  
      return page;
    },
  
    getClientXY: function getClientXY(pointer, client) {
      client = client || {};
  
      if (browser.isOperaMobile && pointerUtils.isNativePointer(pointer)) {
        // Opera Mobile handles the viewport and scrolling oddly
        pointerUtils.getXY('screen', pointer, client);
      } else {
        pointerUtils.getXY('client', pointer, client);
      }
  
      return client;
    },
  
    getPointerId: function getPointerId(pointer) {
      return is.number(pointer.pointerId) ? pointer.pointerId : pointer.identifier;
    },
  
    setCoords: function setCoords(targetObj, pointers, timeStamp) {
      var pointer = pointers.length > 1 ? pointerUtils.pointerAverage(pointers) : pointers[0];
  
      var tmpXY = {};
  
      pointerUtils.getPageXY(pointer, tmpXY);
      targetObj.page.x = tmpXY.x;
      targetObj.page.y = tmpXY.y;
  
      pointerUtils.getClientXY(pointer, tmpXY);
      targetObj.client.x = tmpXY.x;
      targetObj.client.y = tmpXY.y;
  
      targetObj.timeStamp = is.number(timeStamp) ? timeStamp : new Date().getTime();
    },
  
    pointerExtend: pointerExtend,
  
    getTouchPair: function getTouchPair(event) {
      var touches = [];
  
      // array of touches is supplied
      if (is.array(event)) {
        touches[0] = event[0];
        touches[1] = event[1];
      }
      // an event
      else {
          if (event.type === 'touchend') {
            if (event.touches.length === 1) {
              touches[0] = event.touches[0];
              touches[1] = event.changedTouches[0];
            } else if (event.touches.length === 0) {
              touches[0] = event.changedTouches[0];
              touches[1] = event.changedTouches[1];
            }
          } else {
            touches[0] = event.touches[0];
            touches[1] = event.touches[1];
          }
        }
  
      return touches;
    },
  
    pointerAverage: function pointerAverage(pointers) {
      var average = {
        pageX: 0,
        pageY: 0,
        clientX: 0,
        clientY: 0,
        screenX: 0,
        screenY: 0
      };
  
      for (var _i = 0; _i < pointers.length; _i++) {
        var _ref;
  
        _ref = pointers[_i];
        var pointer = _ref;
  
        for (var _prop in average) {
          average[_prop] += pointer[_prop];
        }
      }
      for (var prop in average) {
        average[prop] /= pointers.length;
      }
  
      return average;
    },
  
    touchBBox: function touchBBox(event) {
      if (!event.length && !(event.touches && event.touches.length > 1)) {
        return;
      }
  
      var touches = pointerUtils.getTouchPair(event);
      var minX = Math.min(touches[0].pageX, touches[1].pageX);
      var minY = Math.min(touches[0].pageY, touches[1].pageY);
      var maxX = Math.max(touches[0].pageX, touches[1].pageX);
      var maxY = Math.max(touches[0].pageY, touches[1].pageY);
  
      return {
        x: minX,
        y: minY,
        left: minX,
        top: minY,
        width: maxX - minX,
        height: maxY - minY
      };
    },
  
    touchDistance: function touchDistance(event, deltaSource) {
      var sourceX = deltaSource + 'X';
      var sourceY = deltaSource + 'Y';
      var touches = pointerUtils.getTouchPair(event);
  
      var dx = touches[0][sourceX] - touches[1][sourceX];
      var dy = touches[0][sourceY] - touches[1][sourceY];
  
      return hypot(dx, dy);
    },
  
    touchAngle: function touchAngle(event, prevAngle, deltaSource) {
      var sourceX = deltaSource + 'X';
      var sourceY = deltaSource + 'Y';
      var touches = pointerUtils.getTouchPair(event);
      var dx = touches[1][sourceX] - touches[0][sourceX];
      var dy = touches[1][sourceY] - touches[0][sourceY];
      var angle = 180 * Math.atan2(dy, dx) / Math.PI;
  
      return angle;
    },
  
    getPointerType: function getPointerType(pointer) {
      return is.string(pointer.pointerType) ? pointer.pointerType : is.number(pointer.pointerType) ? [undefined, undefined, 'touch', 'pen', 'mouse'][pointer.pointerType]
      // if the PointerEvent API isn't available, then the "pointer" must
      // be either a MouseEvent, TouchEvent, or Touch object
      : /touch/.test(pointer.type) || pointer instanceof domObjects.Touch ? 'touch' : 'mouse';
    },
  
    // [ event.target, event.currentTarget ]
    getEventTargets: function getEventTargets(event) {
      var path = is.function(event.composedPath) ? event.composedPath() : event.path;
  
      return [domUtils.getActualElement(path ? path[0] : event.target), domUtils.getActualElement(event.currentTarget)];
    }
  };
  
  module.exports = pointerUtils;
  
  },{"./browser":36,"./domObjects":38,"./domUtils":39,"./hypot":43,"./is":46,"./pointerExtend":48}],50:[function(require,module,exports){
  'use strict';
  
  var _require = require('./window'),
      window = _require.window;
  
  var vendors = ['ms', 'moz', 'webkit', 'o'];
  var lastTime = 0;
  var request = void 0;
  var cancel = void 0;
  
  for (var x = 0; x < vendors.length && !window.requestAnimationFrame; x++) {
    request = window[vendors[x] + 'RequestAnimationFrame'];
    cancel = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
  }
  
  if (!request) {
    request = function request(callback) {
      var currTime = new Date().getTime();
      var timeToCall = Math.max(0, 16 - (currTime - lastTime));
      var id = setTimeout(function () {
        callback(currTime + timeToCall);
      }, timeToCall);
  
      lastTime = currTime + timeToCall;
      return id;
    };
  }
  
  if (!cancel) {
    cancel = function cancel(id) {
      clearTimeout(id);
    };
  }
  
  module.exports = {
    request: request,
    cancel: cancel
  };
  
  },{"./window":52}],51:[function(require,module,exports){
  'use strict';
  
  var extend = require('./extend');
  var is = require('./is');
  
  var _require = require('./domUtils'),
      closest = _require.closest,
      parentNode = _require.parentNode,
      getElementRect = _require.getElementRect;
  
  var rectUtils = {
    getStringOptionResult: function getStringOptionResult(value, interactable, element) {
      if (!is.string(value)) {
        return null;
      }
  
      if (value === 'parent') {
        value = parentNode(element);
      } else if (value === 'self') {
        value = interactable.getRect(element);
      } else {
        value = closest(element, value);
      }
  
      return value;
    },
  
    resolveRectLike: function resolveRectLike(value, interactable, element, functionArgs) {
      value = rectUtils.getStringOptionResult(value, interactable, element) || value;
  
      if (is.function(value)) {
        value = value.apply(null, functionArgs);
      }
  
      if (is.element(value)) {
        value = getElementRect(value);
      }
  
      return value;
    },
  
    rectToXY: function rectToXY(rect) {
      return rect && {
        x: 'x' in rect ? rect.x : rect.left,
        y: 'y' in rect ? rect.y : rect.top
      };
    },
  
    xywhToTlbr: function xywhToTlbr(rect) {
      if (rect && !('left' in rect && 'top' in rect)) {
        rect = extend({}, rect);
  
        rect.left = rect.x || 0;
        rect.top = rect.y || 0;
        rect.right = rect.right || rect.left + rect.width;
        rect.bottom = rect.bottom || rect.top + rect.height;
      }
  
      return rect;
    },
  
    tlbrToXywh: function tlbrToXywh(rect) {
      if (rect && !('x' in rect && 'y' in rect)) {
        rect = extend({}, rect);
  
        rect.x = rect.left || 0;
        rect.top = rect.top || 0;
        rect.width = rect.width || rect.right - rect.x;
        rect.height = rect.height || rect.bottom - rect.y;
      }
  
      return rect;
    }
  };
  
  module.exports = rectUtils;
  
  },{"./domUtils":39,"./extend":41,"./is":46}],52:[function(require,module,exports){
  'use strict';
  
  var win = module.exports;
  var isWindow = require('./isWindow');
  
  function init(window) {
    // get wrapped window if using Shadow DOM polyfill
  
    win.realWindow = window;
  
    // create a TextNode
    var el = window.document.createTextNode('');
  
    // check if it's wrapped by a polyfill
    if (el.ownerDocument !== window.document && typeof window.wrap === 'function' && window.wrap(el) === el) {
      // use wrapped window
      window = window.wrap(window);
    }
  
    win.window = window;
  }
  
  if (typeof window === 'undefined') {
    win.window = undefined;
    win.realWindow = undefined;
  } else {
    init(window);
  }
  
  win.getWindow = function getWindow(node) {
    if (isWindow(node)) {
      return node;
    }
  
    var rootNode = node.ownerDocument || node;
  
    return rootNode.defaultView || rootNode.parentWindow || win.window;
  };
  
  win.init = init;
  
  },{"./isWindow":47}]},{},[1])(1)
  });
  
  
  //# sourceMappingURL=interact.js.map
  
  
  /***/ }),
  
  /***/ "fdef":
  /***/ (function(module, exports) {
  
  module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
    '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  
  
  /***/ })
  
  /******/ })["default"];
  //# sourceMappingURL=vue-grid-layout.common.js.map