HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/netwerkbrabant/netwerkbrabant.nl/wwwroot/js/site/app.js
/******/ (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 = 0);
/******/ })
/************************************************************************/
/******/ ({

/***/ "./node_modules/process/browser.js":
/*!*****************************************!*\
  !*** ./node_modules/process/browser.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports) {

// shim for using process in browser
var process = module.exports = {};

// cached from whatever global is present so that test runners that stub it
// don't break things.  But we need to wrap it in a try catch in case it is
// wrapped in strict mode code which doesn't define any globals.  It's inside a
// function because try/catches deoptimize in certain engines.

var cachedSetTimeout;
var cachedClearTimeout;

function defaultSetTimout() {
    throw new Error('setTimeout has not been defined');
}
function defaultClearTimeout () {
    throw new Error('clearTimeout has not been defined');
}
(function () {
    try {
        if (typeof setTimeout === 'function') {
            cachedSetTimeout = setTimeout;
        } else {
            cachedSetTimeout = defaultSetTimout;
        }
    } catch (e) {
        cachedSetTimeout = defaultSetTimout;
    }
    try {
        if (typeof clearTimeout === 'function') {
            cachedClearTimeout = clearTimeout;
        } else {
            cachedClearTimeout = defaultClearTimeout;
        }
    } catch (e) {
        cachedClearTimeout = defaultClearTimeout;
    }
} ())
function runTimeout(fun) {
    if (cachedSetTimeout === setTimeout) {
        //normal enviroments in sane situations
        return setTimeout(fun, 0);
    }
    // if setTimeout wasn't available but was latter defined
    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
        cachedSetTimeout = setTimeout;
        return setTimeout(fun, 0);
    }
    try {
        // when when somebody has screwed with setTimeout but no I.E. maddness
        return cachedSetTimeout(fun, 0);
    } catch(e){
        try {
            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
            return cachedSetTimeout.call(null, fun, 0);
        } catch(e){
            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
            return cachedSetTimeout.call(this, fun, 0);
        }
    }


}
function runClearTimeout(marker) {
    if (cachedClearTimeout === clearTimeout) {
        //normal enviroments in sane situations
        return clearTimeout(marker);
    }
    // if clearTimeout wasn't available but was latter defined
    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
        cachedClearTimeout = clearTimeout;
        return clearTimeout(marker);
    }
    try {
        // when when somebody has screwed with setTimeout but no I.E. maddness
        return cachedClearTimeout(marker);
    } catch (e){
        try {
            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
            return cachedClearTimeout.call(null, marker);
        } catch (e){
            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
            // Some versions of I.E. have different rules for clearTimeout vs setTimeout
            return cachedClearTimeout.call(this, marker);
        }
    }



}
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;

function cleanUpNextTick() {
    if (!draining || !currentQueue) {
        return;
    }
    draining = false;
    if (currentQueue.length) {
        queue = currentQueue.concat(queue);
    } else {
        queueIndex = -1;
    }
    if (queue.length) {
        drainQueue();
    }
}

function drainQueue() {
    if (draining) {
        return;
    }
    var timeout = runTimeout(cleanUpNextTick);
    draining = true;

    var len = queue.length;
    while(len) {
        currentQueue = queue;
        queue = [];
        while (++queueIndex < len) {
            if (currentQueue) {
                currentQueue[queueIndex].run();
            }
        }
        queueIndex = -1;
        len = queue.length;
    }
    currentQueue = null;
    draining = false;
    runClearTimeout(timeout);
}

process.nextTick = function (fun) {
    var args = new Array(arguments.length - 1);
    if (arguments.length > 1) {
        for (var i = 1; i < arguments.length; i++) {
            args[i - 1] = arguments[i];
        }
    }
    queue.push(new Item(fun, args));
    if (queue.length === 1 && !draining) {
        runTimeout(drainQueue);
    }
};

// v8 likes predictible objects
function Item(fun, array) {
    this.fun = fun;
    this.array = array;
}
Item.prototype.run = function () {
    this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};

function noop() {}

process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.prependListener = noop;
process.prependOnceListener = noop;

process.listeners = function (name) { return [] }

process.binding = function (name) {
    throw new Error('process.binding is not supported');
};

process.cwd = function () { return '/' };
process.chdir = function (dir) {
    throw new Error('process.chdir is not supported');
};
process.umask = function() { return 0; };


/***/ }),

/***/ "./node_modules/setimmediate/setImmediate.js":
/*!***************************************************!*\
  !*** ./node_modules/setimmediate/setImmediate.js ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
    "use strict";

    if (global.setImmediate) {
        return;
    }

    var nextHandle = 1; // Spec says greater than zero
    var tasksByHandle = {};
    var currentlyRunningATask = false;
    var doc = global.document;
    var registerImmediate;

    function setImmediate(callback) {
      // Callback can either be a function or a string
      if (typeof callback !== "function") {
        callback = new Function("" + callback);
      }
      // Copy function arguments
      var args = new Array(arguments.length - 1);
      for (var i = 0; i < args.length; i++) {
          args[i] = arguments[i + 1];
      }
      // Store and register the task
      var task = { callback: callback, args: args };
      tasksByHandle[nextHandle] = task;
      registerImmediate(nextHandle);
      return nextHandle++;
    }

    function clearImmediate(handle) {
        delete tasksByHandle[handle];
    }

    function run(task) {
        var callback = task.callback;
        var args = task.args;
        switch (args.length) {
        case 0:
            callback();
            break;
        case 1:
            callback(args[0]);
            break;
        case 2:
            callback(args[0], args[1]);
            break;
        case 3:
            callback(args[0], args[1], args[2]);
            break;
        default:
            callback.apply(undefined, args);
            break;
        }
    }

    function runIfPresent(handle) {
        // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
        // So if we're currently running a task, we'll need to delay this invocation.
        if (currentlyRunningATask) {
            // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
            // "too much recursion" error.
            setTimeout(runIfPresent, 0, handle);
        } else {
            var task = tasksByHandle[handle];
            if (task) {
                currentlyRunningATask = true;
                try {
                    run(task);
                } finally {
                    clearImmediate(handle);
                    currentlyRunningATask = false;
                }
            }
        }
    }

    function installNextTickImplementation() {
        registerImmediate = function(handle) {
            process.nextTick(function () { runIfPresent(handle); });
        };
    }

    function canUsePostMessage() {
        // The test against `importScripts` prevents this implementation from being installed inside a web worker,
        // where `global.postMessage` means something completely different and can't be used for this purpose.
        if (global.postMessage && !global.importScripts) {
            var postMessageIsAsynchronous = true;
            var oldOnMessage = global.onmessage;
            global.onmessage = function() {
                postMessageIsAsynchronous = false;
            };
            global.postMessage("", "*");
            global.onmessage = oldOnMessage;
            return postMessageIsAsynchronous;
        }
    }

    function installPostMessageImplementation() {
        // Installs an event handler on `global` for the `message` event: see
        // * https://developer.mozilla.org/en/DOM/window.postMessage
        // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages

        var messagePrefix = "setImmediate$" + Math.random() + "$";
        var onGlobalMessage = function(event) {
            if (event.source === global &&
                typeof event.data === "string" &&
                event.data.indexOf(messagePrefix) === 0) {
                runIfPresent(+event.data.slice(messagePrefix.length));
            }
        };

        if (global.addEventListener) {
            global.addEventListener("message", onGlobalMessage, false);
        } else {
            global.attachEvent("onmessage", onGlobalMessage);
        }

        registerImmediate = function(handle) {
            global.postMessage(messagePrefix + handle, "*");
        };
    }

    function installMessageChannelImplementation() {
        var channel = new MessageChannel();
        channel.port1.onmessage = function(event) {
            var handle = event.data;
            runIfPresent(handle);
        };

        registerImmediate = function(handle) {
            channel.port2.postMessage(handle);
        };
    }

    function installReadyStateChangeImplementation() {
        var html = doc.documentElement;
        registerImmediate = function(handle) {
            // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
            // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
            var script = doc.createElement("script");
            script.onreadystatechange = function () {
                runIfPresent(handle);
                script.onreadystatechange = null;
                html.removeChild(script);
                script = null;
            };
            html.appendChild(script);
        };
    }

    function installSetTimeoutImplementation() {
        registerImmediate = function(handle) {
            setTimeout(runIfPresent, 0, handle);
        };
    }

    // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.
    var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);
    attachTo = attachTo && attachTo.setTimeout ? attachTo : global;

    // Don't get fooled by e.g. browserify environments.
    if ({}.toString.call(global.process) === "[object process]") {
        // For Node.js before 0.9
        installNextTickImplementation();

    } else if (canUsePostMessage()) {
        // For non-IE10 modern browsers
        installPostMessageImplementation();

    } else if (global.MessageChannel) {
        // For web workers, where supported
        installMessageChannelImplementation();

    } else if (doc && "onreadystatechange" in doc.createElement("script")) {
        // For IE 6–8
        installReadyStateChangeImplementation();

    } else {
        // For older browsers
        installSetTimeoutImplementation();
    }

    attachTo.setImmediate = setImmediate;
    attachTo.clearImmediate = clearImmediate;
}(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));

/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../process/browser.js */ "./node_modules/process/browser.js")))

/***/ }),

/***/ "./node_modules/timers-browserify/main.js":
/*!************************************************!*\
  !*** ./node_modules/timers-browserify/main.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== "undefined" && global) ||
            (typeof self !== "undefined" && self) ||
            window;
var apply = Function.prototype.apply;

// DOM APIs, for completeness

exports.setTimeout = function() {
  return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);
};
exports.setInterval = function() {
  return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);
};
exports.clearTimeout =
exports.clearInterval = function(timeout) {
  if (timeout) {
    timeout.close();
  }
};

function Timeout(id, clearFn) {
  this._id = id;
  this._clearFn = clearFn;
}
Timeout.prototype.unref = Timeout.prototype.ref = function() {};
Timeout.prototype.close = function() {
  this._clearFn.call(scope, this._id);
};

// Does not start the time, just sets up the members needed.
exports.enroll = function(item, msecs) {
  clearTimeout(item._idleTimeoutId);
  item._idleTimeout = msecs;
};

exports.unenroll = function(item) {
  clearTimeout(item._idleTimeoutId);
  item._idleTimeout = -1;
};

exports._unrefActive = exports.active = function(item) {
  clearTimeout(item._idleTimeoutId);

  var msecs = item._idleTimeout;
  if (msecs >= 0) {
    item._idleTimeoutId = setTimeout(function onTimeout() {
      if (item._onTimeout)
        item._onTimeout();
    }, msecs);
  }
};

// setimmediate attaches itself to the global object
__webpack_require__(/*! setimmediate */ "./node_modules/setimmediate/setImmediate.js");
// On some exotic environments, it's not clear which object `setimmediate` was
// able to install onto.  Search each possibility in the same order as the
// `setimmediate` library.
exports.setImmediate = (typeof self !== "undefined" && self.setImmediate) ||
                       (typeof global !== "undefined" && global.setImmediate) ||
                       (this && this.setImmediate);
exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) ||
                         (typeof global !== "undefined" && global.clearImmediate) ||
                         (this && this.clearImmediate);

/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))

/***/ }),

/***/ "./node_modules/webpack/buildin/global.js":
/*!***********************************!*\
  !*** (webpack)/buildin/global.js ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports) {

var g;

// This works in non-strict mode
g = (function() {
	return this;
})();

try {
	// This works if eval is allowed (see CSP)
	g = g || new Function("return this")();
} catch (e) {
	// This works if the window reference is available
	if (typeof window === "object") g = window;
}

// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}

module.exports = g;


/***/ }),

/***/ "./node_modules/webpack/buildin/module.js":
/*!***********************************!*\
  !*** (webpack)/buildin/module.js ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = function(module) {
	if (!module.webpackPolyfill) {
		module.deprecate = function() {};
		module.paths = [];
		// module.parent = undefined by default
		if (!module.children) module.children = [];
		Object.defineProperty(module, "loaded", {
			enumerable: true,
			get: function() {
				return module.l;
			}
		});
		Object.defineProperty(module, "id", {
			enumerable: true,
			get: function() {
				return module.i;
			}
		});
		module.webpackPolyfill = 1;
	}
	return module;
};


/***/ }),

/***/ "./resources/assets/js/global/helpers.js":
/*!***********************************************!*\
  !*** ./resources/assets/js/global/helpers.js ***!
  \***********************************************/
/*! exports provided: isset, EasingFunctions, getScript, Cookie, number_format, capitalizeFirstLetter, snakeToCamel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isset", function() { return isset; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EasingFunctions", function() { return EasingFunctions; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getScript", function() { return getScript; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cookie", function() { return Cookie; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "number_format", function() { return number_format; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "capitalizeFirstLetter", function() { return capitalizeFirstLetter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "snakeToCamel", function() { return snakeToCamel; });
/* ==========================================================================
    Helper functions
 ========================================================================== */

/*
 * Simple isset method for this does not exist in javascript
 */
var isset = function isset(obj) {
  return typeof obj !== 'undefined' && obj !== null;
};
/*
 * Easing Functions - inspired from http://gizma.com/easing/
 * only considering the t value for the range [0, 1] => [0, 1]
 */

var EasingFunctions = {
  // no easing, no acceleration
  linear: function linear(t) {
    return t;
  },
  // accelerating from zero velocity
  easeInQuad: function easeInQuad(t) {
    return t * t;
  },
  // decelerating to zero velocity
  easeOutQuad: function easeOutQuad(t) {
    return t * (2 - t);
  },
  // acceleration until halfway, then deceleration
  easeInOutQuad: function easeInOutQuad(t) {
    return t < .5 ? 2 * t * t : -1 + (4 - 2 * t) * t;
  },
  // accelerating from zero velocity
  easeInCubic: function easeInCubic(t) {
    return t * t * t;
  },
  // decelerating to zero velocity
  easeOutCubic: function easeOutCubic(t) {
    return --t * t * t + 1;
  },
  // acceleration until halfway, then deceleration
  easeInOutCubic: function easeInOutCubic(t) {
    return t < .5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;
  },
  // accelerating from zero velocity
  easeInQuart: function easeInQuart(t) {
    return t * t * t * t;
  },
  // decelerating to zero velocity
  easeOutQuart: function easeOutQuart(t) {
    return 1 - --t * t * t * t;
  },
  // acceleration until halfway, then deceleration
  easeInOutQuart: function easeInOutQuart(t) {
    return t < .5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t;
  },
  // accelerating from zero velocity
  easeInQuint: function easeInQuint(t) {
    return t * t * t * t * t;
  },
  // decelerating to zero velocity
  easeOutQuint: function easeOutQuint(t) {
    return 1 + --t * t * t * t * t;
  },
  // acceleration until halfway, then deceleration
  easeInOutQuint: function easeInOutQuint(t) {
    return t < .5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t;
  }
};
/*
 * Vanilla version of the $.getScript
 */

var getScript = function getScript(source, callback) {
  var script = document.createElement('script');
  script.async = 1;
  var scripts = document.getElementsByTagName('script');
  var prior = scripts[scripts.length - 1];

  script.onload = script.onreadystatechange = function (_, isAbort) {
    if (isAbort || !script.readyState || /loaded|complete/.test(script.readyState)) {
      script.onload = script.onreadystatechange = null;
      script = undefined;

      if (!isAbort) {
        if (callback) callback();
      }
    }
  };

  script.src = source;
  prior.parentNode.insertBefore(script, prior);
};
/*
 * Cookie helper class
 */

var Cookie = {
  set: function set(name, value, days) {
    var domain, domainParts, date, expires, host;

    if (days) {
      date = new Date();
      date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
      expires = "; expires=" + date.toGMTString();
    } else {
      expires = "";
    }

    host = location.host;

    if (host.split('.').length === 1) {
      // no "." in a domain - it's localhost or something similar
      document.cookie = name + "=" + value + expires + "; path=/";
    } else {
      // Remember the cookie on all sub domains.
      //
      // Start with trying to set cookie to the top domain.
      // (example: if user is on foo.com, try to set
      //  cookie to domain ".com")
      //
      // If the cookie will not be set, it means ".com"
      // is a top level domain and we need to
      // set the cookie to ".foo.com"
      domainParts = host.split('.');
      domainParts.shift();
      domain = '.' + domainParts.join('.'); // For development purpose, remove this when moving to production
      // domain = '.komma.pro';

      document.cookie = name + "=" + value + expires + "; path=/; domain=" + domain; // check if cookie was successfuly set to the given domain
      // (otherwise it was a Top-Level Domain)

      if (Cookie.get(name) == null || Cookie.get(name) != value) {
        // append "." to current domain
        domain = '.' + host;
        document.cookie = name + "=" + value + expires + "; path=/; domain=" + domain;
      }
    }
  },
  get: function get(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');

    for (var i = 0; i < ca.length; i++) {
      var c = ca[i];

      while (c.charAt(0) === ' ') {
        c = c.substring(1, c.length);
      }

      if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
    }

    return null;
  },
  erase: function erase(name) {
    Cookie.set(name, '', -1);
  }
};
/*
 * Javascript version of the number_format method of PHP
 */

var number_format = function number_format(number, decimals, dec_point, thousands_sep) {
  // Strip all characters but numerical ones.
  number = (number + '').replace(/[^0-9+\-Ee.]/g, '');

  var n = !isFinite(+number) ? 0 : +number,
      prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),
      sep = typeof thousands_sep === 'undefined' ? ',' : thousands_sep,
      dec = typeof dec_point === 'undefined' ? '.' : dec_point,
      s = '',
      toFixedFix = function toFixedFix(n, prec) {
    var k = Math.pow(10, prec);
    return '' + Math.round(n * k) / k;
  }; // Fix for IE parseFloat(0.55).toFixed(0) = 0;


  s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');

  if (s[0].length > 3) {
    s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep);
  }

  if ((s[1] || '').length < prec) {
    s[1] = s[1] || '';
    s[1] += new Array(prec - s[1].length + 1).join('0');
  }

  return s.join(dec);
};
/**
 * Capitalize the first letter of the string
 * @param string
 * @returns {string}
 */

var capitalizeFirstLetter = function capitalizeFirstLetter(string) {
  return string.charAt(0).toUpperCase() + string.slice(1);
};
/**
 * Convert snake case into camelcase
 *
 * @param string
 * @returns {*}
 */

function snakeToCamel(string) {
  return string.replace(/(\-\w)/g, function (m) {
    return m[1].toUpperCase();
  });
}

/***/ }),

/***/ "./resources/assets/js/global/polyfills/promise.js":
/*!*********************************************************!*\
  !*** ./resources/assets/js/global/polyfills/promise.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(setImmediate, global) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }

(function (global, factory) {
  ( false ? undefined : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? factory() :  true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
				__WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;
})(this, function () {
  'use strict';
  /**
   * @this {Promise}
   */

  function finallyConstructor(callback) {
    var constructor = this.constructor;
    return this.then(function (value) {
      return constructor.resolve(callback()).then(function () {
        return value;
      });
    }, function (reason) {
      return constructor.resolve(callback()).then(function () {
        return constructor.reject(reason);
      });
    });
  } // Store setTimeout reference so promise-polyfill will be unaffected by
  // other code modifying setTimeout (like sinon.useFakeTimers())


  var setTimeoutFunc = setTimeout;

  function noop() {} // Polyfill for Function.prototype.bind


  function bind(fn, thisArg) {
    return function () {
      fn.apply(thisArg, arguments);
    };
  }
  /**
   * @constructor
   * @param {Function} fn
   */


  function Promise(fn) {
    if (!(this instanceof Promise)) throw new TypeError('Promises must be constructed via new');
    if (typeof fn !== 'function') throw new TypeError('not a function');
    /** @type {!number} */

    this._state = 0;
    /** @type {!boolean} */

    this._handled = false;
    /** @type {Promise|undefined} */

    this._value = undefined;
    /** @type {!Array<!Function>} */

    this._deferreds = [];
    doResolve(fn, this);
  }

  function handle(self, deferred) {
    while (self._state === 3) {
      self = self._value;
    }

    if (self._state === 0) {
      self._deferreds.push(deferred);

      return;
    }

    self._handled = true;

    Promise._immediateFn(function () {
      var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;

      if (cb === null) {
        (self._state === 1 ? resolve : reject)(deferred.promise, self._value);
        return;
      }

      var ret;

      try {
        ret = cb(self._value);
      } catch (e) {
        reject(deferred.promise, e);
        return;
      }

      resolve(deferred.promise, ret);
    });
  }

  function resolve(self, newValue) {
    try {
      // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure
      if (newValue === self) throw new TypeError('A promise cannot be resolved with itself.');

      if (newValue && (_typeof(newValue) === 'object' || typeof newValue === 'function')) {
        var then = newValue.then;

        if (newValue instanceof Promise) {
          self._state = 3;
          self._value = newValue;
          finale(self);
          return;
        } else if (typeof then === 'function') {
          doResolve(bind(then, newValue), self);
          return;
        }
      }

      self._state = 1;
      self._value = newValue;
      finale(self);
    } catch (e) {
      reject(self, e);
    }
  }

  function reject(self, newValue) {
    self._state = 2;
    self._value = newValue;
    finale(self);
  }

  function finale(self) {
    if (self._state === 2 && self._deferreds.length === 0) {
      Promise._immediateFn(function () {
        if (!self._handled) {
          Promise._unhandledRejectionFn(self._value);
        }
      });
    }

    for (var i = 0, len = self._deferreds.length; i < len; i++) {
      handle(self, self._deferreds[i]);
    }

    self._deferreds = null;
  }
  /**
   * @constructor
   */


  function Handler(onFulfilled, onRejected, promise) {
    this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
    this.onRejected = typeof onRejected === 'function' ? onRejected : null;
    this.promise = promise;
  }
  /**
   * Take a potentially misbehaving resolver function and make sure
   * onFulfilled and onRejected are only called once.
   *
   * Makes no guarantees about asynchrony.
   */


  function doResolve(fn, self) {
    var done = false;

    try {
      fn(function (value) {
        if (done) return;
        done = true;
        resolve(self, value);
      }, function (reason) {
        if (done) return;
        done = true;
        reject(self, reason);
      });
    } catch (ex) {
      if (done) return;
      done = true;
      reject(self, ex);
    }
  }

  Promise.prototype['catch'] = function (onRejected) {
    return this.then(null, onRejected);
  };

  Promise.prototype.then = function (onFulfilled, onRejected) {
    // @ts-ignore
    var prom = new this.constructor(noop);
    handle(this, new Handler(onFulfilled, onRejected, prom));
    return prom;
  };

  Promise.prototype['finally'] = finallyConstructor;

  Promise.all = function (arr) {
    return new Promise(function (resolve, reject) {
      if (!arr || typeof arr.length === 'undefined') throw new TypeError('Promise.all accepts an array');
      var args = Array.prototype.slice.call(arr);
      if (args.length === 0) return resolve([]);
      var remaining = args.length;

      function res(i, val) {
        try {
          if (val && (_typeof(val) === 'object' || typeof val === 'function')) {
            var then = val.then;

            if (typeof then === 'function') {
              then.call(val, function (val) {
                res(i, val);
              }, reject);
              return;
            }
          }

          args[i] = val;

          if (--remaining === 0) {
            resolve(args);
          }
        } catch (ex) {
          reject(ex);
        }
      }

      for (var i = 0; i < args.length; i++) {
        res(i, args[i]);
      }
    });
  };

  Promise.resolve = function (value) {
    if (value && _typeof(value) === 'object' && value.constructor === Promise) {
      return value;
    }

    return new Promise(function (resolve) {
      resolve(value);
    });
  };

  Promise.reject = function (value) {
    return new Promise(function (resolve, reject) {
      reject(value);
    });
  };

  Promise.race = function (values) {
    return new Promise(function (resolve, reject) {
      for (var i = 0, len = values.length; i < len; i++) {
        values[i].then(resolve, reject);
      }
    });
  }; // Use polyfill for setImmediate for performance gains


  Promise._immediateFn = typeof setImmediate === 'function' && function (fn) {
    setImmediate(fn);
  } || function (fn) {
    setTimeoutFunc(fn, 0);
  };

  Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {
    if (typeof console !== 'undefined' && console) {
      console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console
    }
  };
  /** @suppress {undefinedVars} */


  var globalNS = function () {
    // the only reliable means to get the global object is
    // `Function('return this')()`
    // However, this causes CSP violations in Chrome apps.
    if (typeof self !== 'undefined') {
      return self;
    }

    if (typeof window !== 'undefined') {
      return window;
    }

    if (typeof global !== 'undefined') {
      return global;
    }

    throw new Error('unable to locate global object');
  }();

  if (!('Promise' in globalNS)) {
    globalNS['Promise'] = Promise;
  } else if (!globalNS.Promise.prototype['finally']) {
    globalNS.Promise.prototype['finally'] = finallyConstructor;
  }
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../node_modules/timers-browserify/main.js */ "./node_modules/timers-browserify/main.js").setImmediate, __webpack_require__(/*! ./../../../../../node_modules/webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))

/***/ }),

/***/ "./resources/assets/js/global/polyfills/symbol-es6.min.js":
/*!****************************************************************!*\
  !*** ./resources/assets/js/global/polyfills/symbol-es6.min.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global, module) {function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }

!function (global, factory) {
  "use strict";

  "object" == ( false ? undefined : _typeof(module)) && "object" == _typeof(module.exports) ? module.exports = factory(global) : factory(global);
}("undefined" != typeof window ? window : global, function (global) {
  "use strict";

  var defineProperty = Object.defineProperty,
      defineProperties = Object.defineProperties,
      symbolHiddenCounter = 0,
      globalSymbolRegistry = [],
      slice = Array.prototype.slice,
      ES6 = "object" == _typeof(global.ES6) ? global.ES6 : global.ES6 = {},
      isArray = Array.isArray,
      objectToString = Object.prototype.toString,
      push = Array.prototype.push,
      emptyFunction = function emptyFunction() {},
      simpleFunction = function simpleFunction(arg) {
    return arg;
  },
      isCallable = function isCallable(fn) {
    return "function" == typeof fn;
  },
      Iterator = function Iterator() {},
      ArrayIterator = function ArrayIterator(array, flag) {
    this._array = array, this._flag = flag, this._nextIndex = 0;
  },
      StringIterator = function StringIterator(string, flag) {
    this._string = string, this._flag = flag, this._nextIndex = 0;
  },
      isObject = function isObject(value) {
    return null !== value && ("object" == _typeof(value) || "function" == typeof value);
  },
      setupSymbolInternals = function setupSymbolInternals(symbol, desc) {
    return defineProperties(symbol, {
      _description: {
        value: desc
      },
      _isSymbol: {
        value: !0
      },
      _id: {
        value: symbolHiddenCounter++
      }
    }), symbol;
  },
      appendArray = function appendArray(array1, array2) {
    if ("number" == typeof array1.length && array1.length >= 0 && "number" == typeof array2.length && array2.length >= 0) {
      var length1 = Math.floor(array1.length),
          length2 = Math.floor(array2.length),
          i = 0;

      for (array1.length = length1 + length2; i < length2; ++i) {
        array2.hasOwnProperty(i) && (array1[length1 + i] = array2[i]);
      }
    }
  },
      simpleInheritance = function simpleInheritance(child, parent) {
    if ("function" != typeof child || "function" != typeof parent) throw new TypeError("Child and Parent must be function type");
    child.prototype = Object.create(parent.prototype), child.prototype.constructor = child;
  },
      _Symbol = function _Symbol2(desc) {
    if (desc = void 0 === desc ? "" : String(desc), this instanceof _Symbol2) throw new TypeError("Symbol is not a constructor");
    return setupSymbolInternals(Object.create(_Symbol2.prototype), desc);
  };

  defineProperties(_Symbol, {
    "for": {
      value: function value(key) {
        key = String(key);

        for (var record, registryLength = globalSymbolRegistry.length, i = 0; i < registryLength; ++i) {
          if ((record = globalSymbolRegistry[i]).key === key) return record.symbol;
        }

        return record = {
          key: key,
          symbol: _Symbol(key)
        }, globalSymbolRegistry.push(record), record.symbol;
      },
      writable: !0,
      configurable: !0
    },
    keyFor: {
      value: function value(symbol) {
        if (!ES6.isSymbol(symbol)) throw new TypeError(String(symbol) + " is not a symbol");

        for (var record, registryLength = globalSymbolRegistry.length, i = 0; i < registryLength; ++i) {
          if ((record = globalSymbolRegistry[i]).symbol === symbol) return record.key;
        }
      },
      writable: !0,
      configurable: !0
    },
    hasInstance: {
      value: _Symbol("Symbol.hasInstance")
    },
    isConcatSpreadable: {
      value: _Symbol("Symbol.isConcatSpreadable")
    },
    iterator: {
      value: _Symbol("Symbol.iterator")
    },
    toStringTag: {
      value: _Symbol("Symbol.toStringTag")
    }
  }), _Symbol.prototype.toString = function () {
    return "@@_____" + this._id + "_____";
  }, _Symbol.prototype.valueOf = function () {
    return this;
  }, defineProperty(Iterator.prototype, _Symbol.iterator.toString(), {
    value: function value() {
      return this;
    },
    writable: !0,
    configurable: !0
  }), simpleInheritance(ArrayIterator, Iterator), simpleInheritance(StringIterator, Iterator), defineProperty(ArrayIterator.prototype, _Symbol.toStringTag.toString(), {
    value: "Array Iterator",
    configurable: !0
  }), defineProperty(StringIterator.prototype, _Symbol.toStringTag.toString(), {
    value: "String Iterator",
    configurable: !0
  }), ArrayIterator.prototype.next = function () {
    if (!(this instanceof ArrayIterator)) throw new TypeError("Method Array Iterator.prototype.next called on incompatible receiver " + String(this));
    var nextValue;
    return -1 === this._nextIndex ? {
      done: !0,
      value: void 0
    } : "number" == typeof this._array.length && this._array.length >= 0 && this._nextIndex < Math.floor(this._array.length) ? (1 === this._flag ? nextValue = [this._nextIndex, this._array[this._nextIndex]] : 2 === this._flag ? nextValue = this._array[this._nextIndex] : 3 === this._flag && (nextValue = this._nextIndex), this._nextIndex++, {
      done: !1,
      value: nextValue
    }) : (this._nextIndex = -1, {
      done: !0,
      value: void 0
    });
  }, StringIterator.prototype.next = function () {
    if (!(this instanceof StringIterator)) throw new TypeError("Method String Iterator.prototype.next called on incompatible receiver " + String(this));
    var nextValue,
        stringObject = new String(this._string);
    return -1 === this._nextIndex ? {
      done: !0,
      value: void 0
    } : this._nextIndex < stringObject.length ? (nextValue = stringObject[this._nextIndex], this._nextIndex++, {
      done: !1,
      value: nextValue
    }) : (this._nextIndex = -1, {
      done: !0,
      value: void 0
    });
  };

  var SpreadOperatorImpl = function SpreadOperatorImpl(target, thisArg) {
    this._target = target, this._values = [], this._thisArg = thisArg;
  };

  SpreadOperatorImpl.prototype.spread = function () {
    var self = this;
    return slice.call(arguments).forEach(function (iterable) {
      ES6.forOf(iterable, function (value) {
        self._values.push(value);
      });
    }), self;
  }, SpreadOperatorImpl.prototype.add = function () {
    var self = this;
    return slice.call(arguments).forEach(function (value) {
      self._values.push(value);
    }), self;
  }, SpreadOperatorImpl.prototype.call = function (thisArg) {
    if ("function" != typeof this._target) throw new TypeError("Target is not a function");
    return thisArg = arguments.length <= 0 ? this._thisArg : thisArg, this._target.apply(thisArg, this._values);
  }, SpreadOperatorImpl.prototype["new"] = function () {
    if ("function" != typeof this._target) throw new TypeError("Target is not a constructor");
    var temp, returnValue;
    return temp = Object.create(this._target.prototype), returnValue = this._target.apply(temp, this._values), isObject(returnValue) ? returnValue : temp;
  }, SpreadOperatorImpl.prototype.array = function () {
    if (!isArray(this._target)) throw new TypeError("Target is not a array");
    return push.apply(this._target, this._values), this._target;
  };
  return defineProperties(ES6, {
    isSymbol: {
      value: function value(symbol) {
        return symbol instanceof _Symbol && function (symbol) {
          return !0 === symbol._isSymbol && "number" == typeof symbol._id && "string" == typeof symbol._description;
        }(symbol);
      },
      writable: !0,
      configurable: !0
    },
    instanceOf: {
      value: function value(object, constructor) {
        if (!isObject(constructor)) throw new TypeError("Right-hand side of 'instanceof' is not an object");
        var hasInstanceSymbolProp = constructor[_Symbol.hasInstance];
        if (void 0 === hasInstanceSymbolProp) return object instanceof constructor;
        if ("function" != typeof hasInstanceSymbolProp) throw new TypeError(_typeof(hasInstanceSymbolProp) + " is not a function");
        return hasInstanceSymbolProp.call(constructor, object);
      },
      writable: !0,
      configurable: !0
    },
    forOf: {
      value: function value(iterable, callback, thisArg) {
        if (callback = "function" != typeof callback ? emptyFunction : callback, "function" != typeof iterable[_Symbol.iterator]) throw new TypeError("Iterable[Symbol.iterator] is not a function");

        var iterationResult,
            iterator = iterable[_Symbol.iterator]();

        if ("function" != typeof iterator.next) throw new TypeError(".iterator.next is not a function");

        for (;;) {
          if (iterationResult = iterator.next(), !isObject(iterationResult)) throw new TypeError("Iterator result " + iterationResult + " is not an object");
          if (iterationResult.done) break;
          callback.call(thisArg, iterationResult.value);
        }
      },
      writable: !0,
      configurable: !0
    },
    spreadOperator: {
      value: function value(target, thisArg) {
        if ("function" != typeof target && !isArray(target)) throw new TypeError("Spread operator only supports on array and function objects at this moment");
        return new SpreadOperatorImpl(target, thisArg);
      },
      writable: !0,
      configurable: !0
    }
  }), defineProperty(global, "Symbol", {
    value: _Symbol,
    writable: !0,
    configurable: !0
  }), defineProperty(Function.prototype, _Symbol.hasInstance.toString(), {
    value: function value(instance) {
      return "function" == typeof this && instance instanceof this;
    }
  }), defineProperty(Array.prototype, "concat", {
    value: function value() {
      if (void 0 === this || null === this) throw new TypeError("Array.prototype.concat called on null or undefined");
      var self = Object(this),
          targets = slice.call(arguments),
          outputs = [];
      return targets.unshift(self), targets.forEach(function (target) {
        isObject(target) ? void 0 !== target[_Symbol.isConcatSpreadable] ? target[_Symbol.isConcatSpreadable] ? appendArray(outputs, target) : outputs.push(target) : isArray(target) ? appendArray(outputs, target) : outputs.push(target) : outputs.push(target);
      }), outputs;
    },
    writable: !0,
    configurable: !0
  }), defineProperty(Object.prototype, "toString", {
    value: function value() {
      return void 0 === this || null === this ? objectToString.call(this) : "string" == typeof this[_Symbol.toStringTag] ? "[object " + this[_Symbol.toStringTag] + "]" : objectToString.call(this);
    },
    writable: !0,
    configurable: !0
  }), defineProperty(Array.prototype, _Symbol.iterator.toString(), {
    value: function value() {
      if (void 0 === this || null === this) throw new TypeError("Cannot convert undefined or null to object");
      var self = Object(this);
      return new ArrayIterator(self, 2);
    },
    writable: !0,
    configurable: !0
  }), defineProperty(Array, "from", {
    value: function value(arrayLike, mapFn, thisArg) {
      var constructor,
          length,
          outputs,
          i = 0;
      if (constructor = isCallable(this) ? this : Array, void 0 === arrayLike || null === arrayLike) throw new TypeError("Cannot convert undefined or null to object");
      if (arrayLike = Object(arrayLike), void 0 === mapFn) mapFn = simpleFunction;else if (!isCallable(mapFn)) throw new TypeError(mapFn + " is not a function");

      if (void 0 === arrayLike[_Symbol.iterator]) {
        if (!("number" == typeof arrayLike.length && arrayLike.length >= 0)) return (outputs = new constructor(0)).length = 0, outputs;

        for (length = Math.floor(arrayLike.length), (outputs = new constructor(length)).length = length; i < length; ++i) {
          outputs[i] = mapFn.call(thisArg, arrayLike[i]);
        }
      } else (outputs = new constructor()).length = 0, ES6.forOf(arrayLike, function (value) {
        outputs.length++, outputs[outputs.length - 1] = mapFn.call(thisArg, value);
      });

      return outputs;
    },
    writable: !0,
    configurable: !0
  }), defineProperty(Array.prototype, "entries", {
    value: function value() {
      if (void 0 === this || null === this) throw new TypeError("Cannot convert undefined or null to object");
      var self = Object(this);
      return new ArrayIterator(self, 1);
    },
    writable: !0,
    configurable: !0
  }), defineProperty(Array.prototype, "keys", {
    value: function value() {
      if (void 0 === this || null === this) throw new TypeError("Cannot convert undefined or null to object");
      var self = Object(this);
      return new ArrayIterator(self, 3);
    },
    writable: !0,
    configurable: !0
  }), defineProperty(String.prototype, _Symbol.iterator.toString(), {
    value: function value() {
      if (void 0 === this || null === this) throw new TypeError("String.prototype[Symbol.iterator] called on null or undefined");
      return new StringIterator(String(this), 0);
    },
    writable: !0,
    configurable: !0
  }), ES6;
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../node_modules/webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))

/***/ }),

/***/ "./resources/assets/js/lib/dropzone.js":
/*!*********************************************!*\
  !*** ./resources/assets/js/lib/dropzone.js ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(module) {

function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }

var _createClass = function () {
  function defineProperties(target, props) {
    for (var i = 0; i < props.length; i++) {
      var descriptor = props[i];
      descriptor.enumerable = descriptor.enumerable || false;
      descriptor.configurable = true;
      if ("value" in descriptor) descriptor.writable = true;
      Object.defineProperty(target, descriptor.key, descriptor);
    }
  }

  return function (Constructor, protoProps, staticProps) {
    if (protoProps) defineProperties(Constructor.prototype, protoProps);
    if (staticProps) defineProperties(Constructor, staticProps);
    return Constructor;
  };
}();

function _possibleConstructorReturn(self, call) {
  if (!self) {
    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  }

  return call && (_typeof(call) === "object" || typeof call === "function") ? call : self;
}

function _inherits(subClass, superClass) {
  if (typeof superClass !== "function" && superClass !== null) {
    throw new TypeError("Super expression must either be null or a function, not " + _typeof(superClass));
  }

  subClass.prototype = Object.create(superClass && superClass.prototype, {
    constructor: {
      value: subClass,
      enumerable: false,
      writable: true,
      configurable: true
    }
  });
  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}

function _classCallCheck(instance, Constructor) {
  if (!(instance instanceof Constructor)) {
    throw new TypeError("Cannot call a class as a function");
  }
}
/*
 *
 * More info at [www.dropzonejs.com](http://www.dropzonejs.com)
 *
 * Copyright (c) 2012, Matias Meno
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 */
// The Emitter class provides the ability to call `.on()` on Dropzone to listen
// to events.
// It is strongly based on component's emitter class, and I removed the
// functionality because of the dependency hell with different frameworks.


var Emitter = function () {
  function Emitter() {
    _classCallCheck(this, Emitter);
  }

  _createClass(Emitter, [{
    key: "on",
    // Add an event listener for given event
    value: function on(event, fn) {
      this._callbacks = this._callbacks || {}; // Create namespace for this event

      if (!this._callbacks[event]) {
        this._callbacks[event] = [];
      }

      this._callbacks[event].push(fn);

      return this;
    }
  }, {
    key: "emit",
    value: function emit(event) {
      this._callbacks = this._callbacks || {};
      var callbacks = this._callbacks[event];

      if (callbacks) {
        for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
          args[_key - 1] = arguments[_key];
        }

        for (var _iterator = callbacks, _isArray = true, _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
          var _ref;

          if (_isArray) {
            if (_i >= _iterator.length) break;
            _ref = _iterator[_i++];
          } else {
            _i = _iterator.next();
            if (_i.done) break;
            _ref = _i.value;
          }

          var callback = _ref;
          callback.apply(this, args);
        }
      }

      return this;
    } // Remove event listener for given event. If fn is not provided, all event
    // listeners for that event will be removed. If neither is provided, all
    // event listeners will be removed.

  }, {
    key: "off",
    value: function off(event, fn) {
      if (!this._callbacks || arguments.length === 0) {
        this._callbacks = {};
        return this;
      } // specific event


      var callbacks = this._callbacks[event];

      if (!callbacks) {
        return this;
      } // remove all handlers


      if (arguments.length === 1) {
        delete this._callbacks[event];
        return this;
      } // remove specific handler


      for (var i = 0; i < callbacks.length; i++) {
        var callback = callbacks[i];

        if (callback === fn) {
          callbacks.splice(i, 1);
          break;
        }
      }

      return this;
    }
  }]);

  return Emitter;
}();

var Dropzone = function (_Emitter) {
  _inherits(Dropzone, _Emitter);

  _createClass(Dropzone, null, [{
    key: "initClass",
    value: function initClass() {
      // Exposing the emitter class, mainly for tests
      this.prototype.Emitter = Emitter;
      /*
       This is a list of all available events you can register on a dropzone object.
        You can register an event handler like this:
        dropzone.on("dragEnter", function() { });
        */

      this.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave", "addedfile", "addedfiles", "removedfile", "thumbnail", "error", "errormultiple", "processing", "processingmultiple", "uploadprogress", "totaluploadprogress", "sending", "sendingmultiple", "success", "successmultiple", "canceled", "canceledmultiple", "complete", "completemultiple", "reset", "maxfilesexceeded", "maxfilesreached", "queuecomplete"];
      this.prototype.defaultOptions = {
        /**
         * Has to be specified on elements other than form (or when the form
         * doesn't have an `action` attribute). You can also
         * provide a function that will be called with `files` and
         * must return the url (since `v3.12.0`)
         */
        url: null,

        /**
         * Can be changed to `"put"` if necessary. You can also provide a function
         * that will be called with `files` and must return the method (since `v3.12.0`).
         */
        method: "post",

        /**
         * Will be set on the XHRequest.
         */
        withCredentials: false,

        /**
         * The timeout for the XHR requests in milliseconds (since `v4.4.0`).
         */
        timeout: 30000,

        /**
         * How many file uploads to process in parallel (See the
         * Enqueuing file uploads* documentation section for more info)
         */
        parallelUploads: 2,

        /**
         * Whether to send multiple files in one request. If
         * this it set to true, then the fallback file input element will
         * have the `multiple` attribute as well. This option will
         * also trigger additional events (like `processingmultiple`). See the events
         * documentation section for more information.
         */
        uploadMultiple: false,

        /**
         * Whether you want files to be uploaded in chunks to your server. This can't be
         * used in combination with `uploadMultiple`.
         *
         * See [chunksUploaded](#config-chunksUploaded) for the callback to finalise an upload.
         */
        chunking: false,

        /**
         * If `chunking` is enabled, this defines whether **every** file should be chunked,
         * even if the file size is below chunkSize. This means, that the additional chunk
         * form data will be submitted and the `chunksUploaded` callback will be invoked.
         */
        forceChunking: false,

        /**
         * If `chunking` is `true`, then this defines the chunk size in bytes.
         */
        chunkSize: 2000000,

        /**
         * If `true`, the individual chunks of a file are being uploaded simultaneously.
         */
        parallelChunkUploads: false,

        /**
         * Whether a chunk should be retried if it fails.
         */
        retryChunks: false,

        /**
         * If `retryChunks` is true, how many times should it be retried.
         */
        retryChunksLimit: 3,

        /**
         * If not `null` defines how many files this Dropzone handles. If it exceeds,
         * the event `maxfilesexceeded` will be called. The dropzone element gets the
         * class `dz-max-files-reached` accordingly so you can provide visual feedback.
         */
        maxFilesize: 256,

        /**
         * The name of the file param that gets transferred.
         * **NOTE**: If you have the option  `uploadMultiple` set to `true`, then
         * Dropzone will append `[]` to the name.
         */
        paramName: "file",

        /**
         * Whether thumbnails for images should be generated
         */
        createImageThumbnails: true,

        /**
         * In MB. When the filename exceeds this limit, the thumbnail will not be generated.
         */
        maxThumbnailFilesize: 10,

        /**
         * If `null`, the ratio of the image will be used to calculate it.
         */
        thumbnailWidth: 120,

        /**
         * The same as `thumbnailWidth`. If both are null, images will not be resized.
         */
        thumbnailHeight: 120,

        /**
         * How the images should be scaled down in case both, `thumbnailWidth` and `thumbnailHeight` are provided.
         * Can be either `contain` or `crop`.
         */
        thumbnailMethod: 'crop',

        /**
         * If set, images will be resized to these dimensions before being **uploaded**.
         * If only one, `resizeWidth` **or** `resizeHeight` is provided, the original aspect
         * ratio of the file will be preserved.
         *
         * The `options.transformFile` function uses these options, so if the `transformFile` function
         * is overridden, these options don't do anything.
         */
        resizeWidth: null,

        /**
         * See `resizeWidth`.
         */
        resizeHeight: null,

        /**
         * The mime type of the resized image (before it gets uploaded to the server).
         * If `null` the original mime type will be used. To force jpeg, for example, use `image/jpeg`.
         * See `resizeWidth` for more information.
         */
        resizeMimeType: null,

        /**
         * The quality of the resized images. See `resizeWidth`.
         */
        resizeQuality: 0.8,

        /**
         * How the images should be scaled down in case both, `resizeWidth` and `resizeHeight` are provided.
         * Can be either `contain` or `crop`.
         */
        resizeMethod: 'contain',

        /**
         * The base that is used to calculate the filesize. You can change this to
         * 1024 if you would rather display kibibytes, mebibytes, etc...
         * 1024 is technically incorrect, because `1024 bytes` are `1 kibibyte` not `1 kilobyte`.
         * You can change this to `1024` if you don't care about validity.
         */
        filesizeBase: 1000,

        /**
         * Can be used to limit the maximum number of files that will be handled by this Dropzone
         */
        maxFiles: null,

        /**
         * An optional object to send additional headers to the server. Eg:
         * `{ "My-Awesome-Header": "header value" }`
         */
        headers: null,

        /**
         * If `true`, the dropzone element itself will be clickable, if `false`
         * nothing will be clickable.
         *
         * You can also pass an HTML element, a CSS selector (for multiple elements)
         * or an array of those. In that case, all of those elements will trigger an
         * upload when clicked.
         */
        clickable: true,

        /**
         * Whether hidden files in directories should be ignored.
         */
        ignoreHiddenFiles: true,

        /**
         * The default implementation of `accept` checks the file's mime type or
         * extension against this list. This is a comma separated list of mime
         * types or file extensions.
         *
         * Eg.: `image/*,application/pdf,.psd`
         *
         * If the Dropzone is `clickable` this option will also be used as
         * [`accept`](https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept)
         * parameter on the hidden file input as well.
         */
        acceptedFiles: null,

        /**
         * **Deprecated!**
         * Use acceptedFiles instead.
         */
        acceptedMimeTypes: null,

        /**
         * If false, files will be added to the queue but the queue will not be
         * processed automatically.
         * This can be useful if you need some additional user input before sending
         * files (or if you want want all files sent at once).
         * If you're ready to send the file simply call `myDropzone.processQueue()`.
         *
         * See the [enqueuing file uploads](#enqueuing-file-uploads) documentation
         * section for more information.
         */
        autoProcessQueue: true,

        /**
         * If false, files added to the dropzone will not be queued by default.
         * You'll have to call `enqueueFile(file)` manually.
         */
        autoQueue: true,

        /**
         * If `true`, this will add a link to every file preview to remove or cancel (if
         * already uploading) the file. The `dictCancelUpload`, `dictCancelUploadConfirmation`
         * and `dictRemoveFile` options are used for the wording.
         */
        addRemoveLinks: false,

        /**
         * Defines where to display the file previews – if `null` the
         * Dropzone element itself is used. Can be a plain `HTMLElement` or a CSS
         * selector. The element should have the `dropzone-previews` class so
         * the previews are displayed properly.
         */
        previewsContainer: null,

        /**
         * This is the element the hidden input field (which is used when clicking on the
         * dropzone to trigger file selection) will be appended to. This might
         * be important in case you use frameworks to switch the content of your page.
         *
         * Can be a selector string, or an element directly.
         */
        hiddenInputContainer: "body",

        /**
         * If null, no capture type will be specified
         * If camera, mobile devices will skip the file selection and choose camera
         * If microphone, mobile devices will skip the file selection and choose the microphone
         * If camcorder, mobile devices will skip the file selection and choose the camera in video mode
         * On apple devices multiple must be set to false.  AcceptedFiles may need to
         * be set to an appropriate mime type (e.g. "image/*", "audio/*", or "video/*").
         */
        capture: null,

        /**
         * **Deprecated**. Use `renameFile` instead.
         */
        renameFilename: null,

        /**
         * A function that is invoked before the file is uploaded to the server and renames the file.
         * This function gets the `File` as argument and can use the `file.name`. The actual name of the
         * file that gets used during the upload can be accessed through `file.upload.filename`.
         */
        renameFile: null,

        /**
         * If `true` the fallback will be forced. This is very useful to test your server
         * implementations first and make sure that everything works as
         * expected without dropzone if you experience problems, and to test
         * how your fallbacks will look.
         */
        forceFallback: false,

        /**
         * The text used before any files are dropped.
         */
        dictDefaultMessage: "Drop files here to upload",

        /**
         * The text that replaces the default message text it the browser is not supported.
         */
        dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.",

        /**
         * The text that will be added before the fallback form.
         * If you provide a  fallback element yourself, or if this option is `null` this will
         * be ignored.
         */
        dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.",

        /**
         * If the filesize is too big.
         * `{{filesize}}` and `{{maxFilesize}}` will be replaced with the respective configuration values.
         */
        dictFileTooBig: "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",

        /**
         * If the file doesn't match the file type.
         */
        dictInvalidFileType: "You can't upload files of this type.",

        /**
         * If the server response was invalid.
         * `{{statusCode}}` will be replaced with the servers status code.
         */
        dictResponseError: "Server responded with {{statusCode}} code.",

        /**
         * If `addRemoveLinks` is true, the text to be used for the cancel upload link.
         */
        dictCancelUpload: "Cancel upload",

        /**
         * The text that is displayed if an upload was manually canceled
         */
        dictUploadCanceled: "Upload canceled.",

        /**
         * If `addRemoveLinks` is true, the text to be used for confirmation when cancelling upload.
         */
        dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?",

        /**
         * If `addRemoveLinks` is true, the text to be used to remove a file.
         */
        dictRemoveFile: "Remove file",

        /**
         * If this is not null, then the user will be prompted before removing a file.
         */
        dictRemoveFileConfirmation: null,

        /**
         * Displayed if `maxFiles` is st and exceeded.
         * The string `{{maxFiles}}` will be replaced by the configuration value.
         */
        dictMaxFilesExceeded: "You can not upload any more files.",

        /**
         * Allows you to translate the different units. Starting with `tb` for terabytes and going down to
         * `b` for bytes.
         */
        dictFileSizeUnits: {
          tb: "TB",
          gb: "GB",
          mb: "MB",
          kb: "KB",
          b: "b"
        },

        /**
         * Called when dropzone initialized
         * You can add event listeners here
         */
        init: function init() {},

        /**
         * Can be an **object** of additional parameters to transfer to the server, **or** a `Function`
         * that gets invoked with the `files`, `xhr` and, if it's a chunked upload, `chunk` arguments. In case
         * of a function, this needs to return a map.
         *
         * The default implementation does nothing for normal uploads, but adds relevant information for
         * chunked uploads.
         *
         * This is the same as adding hidden input fields in the form element.
         */
        params: function params(files, xhr, chunk) {
          if (chunk) {
            return {
              dzuuid: chunk.file.upload.uuid,
              dzchunkindex: chunk.index,
              dztotalfilesize: chunk.file.size,
              dzchunksize: this.options.chunkSize,
              dztotalchunkcount: chunk.file.upload.totalChunkCount,
              dzchunkbyteoffset: chunk.index * this.options.chunkSize
            };
          }
        },

        /**
         * A function that gets a [file](https://developer.mozilla.org/en-US/docs/DOM/File)
         * and a `done` function as parameters.
         *
         * If the done function is invoked without arguments, the file is "accepted" and will
         * be processed. If you pass an error message, the file is rejected, and the error
         * message will be displayed.
         * This function will not be called if the file is too big or doesn't match the mime types.
         */
        accept: function accept(file, done) {
          return done();
        },

        /**
         * The callback that will be invoked when all chunks have been uploaded for a file.
         * It gets the file for which the chunks have been uploaded as the first parameter,
         * and the `done` function as second. `done()` needs to be invoked when everything
         * needed to finish the upload process is done.
         */
        chunksUploaded: function chunksUploaded(file, done) {
          done();
        },

        /**
         * Gets called when the browser is not supported.
         * The default implementation shows the fallback input field and adds
         * a text.
         */
        fallback: function fallback() {
          // This code should pass in IE7... :(
          var messageElement = void 0;
          this.element.className = this.element.className + " dz-browser-not-supported";

          for (var _iterator2 = this.element.getElementsByTagName("div"), _isArray2 = true, _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
            var _ref2;

            if (_isArray2) {
              if (_i2 >= _iterator2.length) break;
              _ref2 = _iterator2[_i2++];
            } else {
              _i2 = _iterator2.next();
              if (_i2.done) break;
              _ref2 = _i2.value;
            }

            var child = _ref2;

            if (/(^| )dz-message($| )/.test(child.className)) {
              messageElement = child;
              child.className = "dz-message"; // Removes the 'dz-default' class

              break;
            }
          }

          if (!messageElement) {
            messageElement = Dropzone.createElement("<div class=\"dz-message\"><span></span></div>");
            this.element.appendChild(messageElement);
          }

          var span = messageElement.getElementsByTagName("span")[0];

          if (span) {
            if (span.textContent != null) {
              span.textContent = this.options.dictFallbackMessage;
            } else if (span.innerText != null) {
              span.innerText = this.options.dictFallbackMessage;
            }
          }

          return this.element.appendChild(this.getFallbackForm());
        },

        /**
         * Gets called to calculate the thumbnail dimensions.
         *
         * It gets `file`, `width` and `height` (both may be `null`) as parameters and must return an object containing:
         *
         *  - `srcWidth` & `srcHeight` (required)
         *  - `trgWidth` & `trgHeight` (required)
         *  - `srcX` & `srcY` (optional, default `0`)
         *  - `trgX` & `trgY` (optional, default `0`)
         *
         * Those values are going to be used by `ctx.drawImage()`.
         */
        resize: function resize(file, width, height, resizeMethod) {
          var info = {
            srcX: 0,
            srcY: 0,
            srcWidth: file.width,
            srcHeight: file.height
          };
          var srcRatio = file.width / file.height; // Automatically calculate dimensions if not specified

          if (width == null && height == null) {
            width = info.srcWidth;
            height = info.srcHeight;
          } else if (width == null) {
            width = height * srcRatio;
          } else if (height == null) {
            height = width / srcRatio;
          } // Make sure images aren't upscaled


          width = Math.min(width, info.srcWidth);
          height = Math.min(height, info.srcHeight);
          var trgRatio = width / height;

          if (info.srcWidth > width || info.srcHeight > height) {
            // Image is bigger and needs rescaling
            if (resizeMethod === 'crop') {
              if (srcRatio > trgRatio) {
                info.srcHeight = file.height;
                info.srcWidth = info.srcHeight * trgRatio;
              } else {
                info.srcWidth = file.width;
                info.srcHeight = info.srcWidth / trgRatio;
              }
            } else if (resizeMethod === 'contain') {
              // Method 'contain'
              if (srcRatio > trgRatio) {
                height = width / srcRatio;
              } else {
                width = height * srcRatio;
              }
            } else {
              throw new Error("Unknown resizeMethod '" + resizeMethod + "'");
            }
          }

          info.srcX = (file.width - info.srcWidth) / 2;
          info.srcY = (file.height - info.srcHeight) / 2;
          info.trgWidth = width;
          info.trgHeight = height;
          return info;
        },

        /**
         * Can be used to transform the file (for example, resize an image if necessary).
         *
         * The default implementation uses `resizeWidth` and `resizeHeight` (if provided) and resizes
         * images according to those dimensions.
         *
         * Gets the `file` as the first parameter, and a `done()` function as the second, that needs
         * to be invoked with the file when the transformation is done.
         */
        transformFile: function transformFile(file, done) {
          if ((this.options.resizeWidth || this.options.resizeHeight) && file.type.match(/image.*/)) {
            return this.resizeImage(file, this.options.resizeWidth, this.options.resizeHeight, this.options.resizeMethod, done);
          } else {
            return done(file);
          }
        },

        /**
         * A string that contains the template used for each dropped
         * file. Change it to fulfill your needs but make sure to properly
         * provide all elements.
         *
         * If you want to use an actual HTML element instead of providing a String
         * as a config option, you could create a div with the id `tpl`,
         * put the template inside it and provide the element like this:
         *
         *     document
         *       .querySelector('#tpl')
         *       .innerHTML
         *
         */
        previewTemplate: "<div class=\"dz-preview dz-file-preview\">\n  <div class=\"dz-image\"><img data-dz-thumbnail /></div>\n  <div class=\"dz-details\">\n    <div class=\"dz-size\"><span data-dz-size></span></div>\n    <div class=\"dz-filename\"><span data-dz-name></span></div>\n  </div>\n  <div class=\"dz-progress\"><span class=\"dz-upload\" data-dz-uploadprogress></span></div>\n  <div class=\"dz-error-message\"><span data-dz-errormessage></span></div>\n  <div class=\"dz-success-mark\">\n    <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:sketch=\"http://www.bohemiancoding.com/sketch/ns\">\n      <title>Check</title>\n      <defs></defs>\n      <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" sketch:type=\"MSPage\">\n        <path d=\"M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\" id=\"Oval-2\" stroke-opacity=\"0.198794158\" stroke=\"#747474\" fill-opacity=\"0.816519475\" fill=\"#FFFFFF\" sketch:type=\"MSShapeGroup\"></path>\n      </g>\n    </svg>\n  </div>\n  <div class=\"dz-error-mark\">\n    <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:sketch=\"http://www.bohemiancoding.com/sketch/ns\">\n      <title>Error</title>\n      <defs></defs>\n      <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" sketch:type=\"MSPage\">\n        <g id=\"Check-+-Oval-2\" sketch:type=\"MSLayerGroup\" stroke=\"#747474\" stroke-opacity=\"0.198794158\" fill=\"#FFFFFF\" fill-opacity=\"0.816519475\">\n          <path d=\"M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\" id=\"Oval-2\" sketch:type=\"MSShapeGroup\"></path>\n        </g>\n      </g>\n    </svg>\n  </div>\n</div>",
        // END OPTIONS
        // (Required by the dropzone documentation parser)

        /*
         Those functions register themselves to the events on init and handle all
         the user interface specific stuff. Overwriting them won't break the upload
         but can break the way it's displayed.
         You can overwrite them if you don't like the default behavior. If you just
         want to add an additional event handler, register it on the dropzone object
         and don't overwrite those options.
         */
        // Those are self explanatory and simply concern the DragnDrop.
        drop: function drop(e) {
          return this.element.classList.remove("dz-drag-hover");
        },
        dragstart: function dragstart(e) {},
        dragend: function dragend(e) {
          return this.element.classList.remove("dz-drag-hover");
        },
        dragenter: function dragenter(e) {
          return this.element.classList.add("dz-drag-hover");
        },
        dragover: function dragover(e) {
          return this.element.classList.add("dz-drag-hover");
        },
        dragleave: function dragleave(e) {
          return this.element.classList.remove("dz-drag-hover");
        },
        paste: function paste(e) {},
        // Called whenever there are no files left in the dropzone anymore, and the
        // dropzone should be displayed as if in the initial state.
        reset: function reset() {
          return this.element.classList.remove("dz-started");
        },
        // Called when a file is added to the queue
        // Receives `file`
        addedfile: function addedfile(file) {
          var _this2 = this;

          if (this.element === this.previewsContainer) {
            this.element.classList.add("dz-started");
          }

          if (this.previewsContainer) {
            file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim());
            file.previewTemplate = file.previewElement; // Backwards compatibility

            this.previewsContainer.appendChild(file.previewElement);

            for (var _iterator3 = file.previewElement.querySelectorAll("[data-dz-name]"), _isArray3 = true, _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
              var _ref3;

              if (_isArray3) {
                if (_i3 >= _iterator3.length) break;
                _ref3 = _iterator3[_i3++];
              } else {
                _i3 = _iterator3.next();
                if (_i3.done) break;
                _ref3 = _i3.value;
              }

              var node = _ref3;
              node.textContent = file.name;
            }

            for (var _iterator4 = file.previewElement.querySelectorAll("[data-dz-size]"), _isArray4 = true, _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
              if (_isArray4) {
                if (_i4 >= _iterator4.length) break;
                node = _iterator4[_i4++];
              } else {
                _i4 = _iterator4.next();
                if (_i4.done) break;
                node = _i4.value;
              }

              node.innerHTML = this.filesize(file.size);
            }

            if (this.options.addRemoveLinks) {
              file._removeLink = Dropzone.createElement("<a class=\"dz-remove\" href=\"javascript:undefined;\" data-dz-remove>" + this.options.dictRemoveFile + "</a>");
              file.previewElement.appendChild(file._removeLink);
            }

            var removeFileEvent = function removeFileEvent(e) {
              e.preventDefault();
              e.stopPropagation();

              if (file.status === Dropzone.UPLOADING) {
                return Dropzone.confirm(_this2.options.dictCancelUploadConfirmation, function () {
                  return _this2.removeFile(file);
                });
              } else {
                if (_this2.options.dictRemoveFileConfirmation) {
                  return Dropzone.confirm(_this2.options.dictRemoveFileConfirmation, function () {
                    return _this2.removeFile(file);
                  });
                } else {
                  return _this2.removeFile(file);
                }
              }
            };

            for (var _iterator5 = file.previewElement.querySelectorAll("[data-dz-remove]"), _isArray5 = true, _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {
              var _ref4;

              if (_isArray5) {
                if (_i5 >= _iterator5.length) break;
                _ref4 = _iterator5[_i5++];
              } else {
                _i5 = _iterator5.next();
                if (_i5.done) break;
                _ref4 = _i5.value;
              }

              var removeLink = _ref4;
              removeLink.addEventListener("click", removeFileEvent);
            }
          }
        },
        // Called whenever a file is removed.
        removedfile: function removedfile(file) {
          if (file.previewElement != null && file.previewElement.parentNode != null) {
            file.previewElement.parentNode.removeChild(file.previewElement);
          }

          return this._updateMaxFilesReachedClass();
        },
        // Called when a thumbnail has been generated
        // Receives `file` and `dataUrl`
        thumbnail: function thumbnail(file, dataUrl) {
          if (file.previewElement) {
            file.previewElement.classList.remove("dz-file-preview");

            for (var _iterator6 = file.previewElement.querySelectorAll("[data-dz-thumbnail]"), _isArray6 = true, _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) {
              var _ref5;

              if (_isArray6) {
                if (_i6 >= _iterator6.length) break;
                _ref5 = _iterator6[_i6++];
              } else {
                _i6 = _iterator6.next();
                if (_i6.done) break;
                _ref5 = _i6.value;
              }

              var thumbnailElement = _ref5;
              thumbnailElement.alt = file.name;
              thumbnailElement.src = dataUrl;
            }

            return setTimeout(function () {
              return file.previewElement.classList.add("dz-image-preview");
            }, 1);
          }
        },
        // Called whenever an error occurs
        // Receives `file` and `message`
        error: function error(file, message) {
          if (file.previewElement) {
            file.previewElement.classList.add("dz-error");

            if (typeof message !== "String" && message.error) {
              message = message.error;
            }

            for (var _iterator7 = file.previewElement.querySelectorAll("[data-dz-errormessage]"), _isArray7 = true, _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) {
              var _ref6;

              if (_isArray7) {
                if (_i7 >= _iterator7.length) break;
                _ref6 = _iterator7[_i7++];
              } else {
                _i7 = _iterator7.next();
                if (_i7.done) break;
                _ref6 = _i7.value;
              }

              var node = _ref6;
              node.textContent = message;
            }
          }
        },
        errormultiple: function errormultiple() {},
        // Called when a file gets processed. Since there is a cue, not all added
        // files are processed immediately.
        // Receives `file`
        processing: function processing(file) {
          if (file.previewElement) {
            file.previewElement.classList.add("dz-processing");

            if (file._removeLink) {
              return file._removeLink.innerHTML = this.options.dictCancelUpload;
            }
          }
        },
        processingmultiple: function processingmultiple() {},
        // Called whenever the upload progress gets updated.
        // Receives `file`, `progress` (percentage 0-100) and `bytesSent`.
        // To get the total number of bytes of the file, use `file.size`
        uploadprogress: function uploadprogress(file, progress, bytesSent) {
          if (file.previewElement) {
            for (var _iterator8 = file.previewElement.querySelectorAll("[data-dz-uploadprogress]"), _isArray8 = true, _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) {
              var _ref7;

              if (_isArray8) {
                if (_i8 >= _iterator8.length) break;
                _ref7 = _iterator8[_i8++];
              } else {
                _i8 = _iterator8.next();
                if (_i8.done) break;
                _ref7 = _i8.value;
              }

              var node = _ref7;
              node.nodeName === 'PROGRESS' ? node.value = progress : node.style.width = progress + "%";
            }
          }
        },
        // Called whenever the total upload progress gets updated.
        // Called with totalUploadProgress (0-100), totalBytes and totalBytesSent
        totaluploadprogress: function totaluploadprogress() {},
        // Called just before the file is sent. Gets the `xhr` object as second
        // parameter, so you can modify it (for example to add a CSRF token) and a
        // `formData` object to add additional information.
        sending: function sending() {},
        sendingmultiple: function sendingmultiple() {},
        // When the complete upload is finished and successful
        // Receives `file`
        success: function success(file) {
          if (file.previewElement) {
            return file.previewElement.classList.add("dz-success");
          }
        },
        successmultiple: function successmultiple() {},
        // When the upload is canceled.
        canceled: function canceled(file) {
          return this.emit("error", file, this.options.dictUploadCanceled);
        },
        canceledmultiple: function canceledmultiple() {},
        // When the upload is finished, either with success or an error.
        // Receives `file`
        complete: function complete(file) {
          if (file._removeLink) {
            file._removeLink.innerHTML = this.options.dictRemoveFile;
          }

          if (file.previewElement) {
            return file.previewElement.classList.add("dz-complete");
          }
        },
        completemultiple: function completemultiple() {},
        maxfilesexceeded: function maxfilesexceeded() {},
        maxfilesreached: function maxfilesreached() {},
        queuecomplete: function queuecomplete() {},
        addedfiles: function addedfiles() {}
      };
      this.prototype._thumbnailQueue = [];
      this.prototype._processingThumbnail = false;
    } // global utility

  }, {
    key: "extend",
    value: function extend(target) {
      for (var _len2 = arguments.length, objects = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
        objects[_key2 - 1] = arguments[_key2];
      }

      for (var _iterator9 = objects, _isArray9 = true, _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) {
        var _ref8;

        if (_isArray9) {
          if (_i9 >= _iterator9.length) break;
          _ref8 = _iterator9[_i9++];
        } else {
          _i9 = _iterator9.next();
          if (_i9.done) break;
          _ref8 = _i9.value;
        }

        var object = _ref8;

        for (var key in object) {
          var val = object[key];
          target[key] = val;
        }
      }

      return target;
    }
  }]);

  function Dropzone(el, options) {
    _classCallCheck(this, Dropzone);

    var _this = _possibleConstructorReturn(this, (Dropzone.__proto__ || Object.getPrototypeOf(Dropzone)).call(this));

    var fallback = void 0,
        left = void 0;
    _this.element = el; // For backwards compatibility since the version was in the prototype previously

    _this.version = Dropzone.version;
    _this.defaultOptions.previewTemplate = _this.defaultOptions.previewTemplate.replace(/\n*/g, "");
    _this.clickableElements = [];
    _this.listeners = [];
    _this.files = []; // All files

    if (typeof _this.element === "string") {
      _this.element = document.querySelector(_this.element);
    } // Not checking if instance of HTMLElement or Element since IE9 is extremely weird.


    if (!_this.element || _this.element.nodeType == null) {
      throw new Error("Invalid dropzone element.");
    }

    if (_this.element.dropzone) {
      throw new Error("Dropzone already attached.");
    } // Now add this dropzone to the instances.


    Dropzone.instances.push(_this); // Put the dropzone inside the element itself.

    _this.element.dropzone = _this;
    var elementOptions = (left = Dropzone.optionsForElement(_this.element)) != null ? left : {};
    _this.options = Dropzone.extend({}, _this.defaultOptions, elementOptions, options != null ? options : {}); // If the browser failed, just call the fallback and leave

    if (_this.options.forceFallback || !Dropzone.isBrowserSupported()) {
      var _ret;

      return _ret = _this.options.fallback.call(_this), _possibleConstructorReturn(_this, _ret);
    } // @options.url = @element.getAttribute "action" unless @options.url?


    if (_this.options.url == null) {
      _this.options.url = _this.element.getAttribute("action");
    }

    if (!_this.options.url) {
      throw new Error("No URL provided.");
    }

    if (_this.options.acceptedFiles && _this.options.acceptedMimeTypes) {
      throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");
    }

    if (_this.options.uploadMultiple && _this.options.chunking) {
      throw new Error('You cannot set both: uploadMultiple and chunking.');
    } // Backwards compatibility


    if (_this.options.acceptedMimeTypes) {
      _this.options.acceptedFiles = _this.options.acceptedMimeTypes;
      delete _this.options.acceptedMimeTypes;
    } // Backwards compatibility


    if (_this.options.renameFilename != null) {
      _this.options.renameFile = function (file) {
        return _this.options.renameFilename.call(_this, file.name, file);
      };
    }

    _this.options.method = _this.options.method.toUpperCase();

    if ((fallback = _this.getExistingFallback()) && fallback.parentNode) {
      // Remove the fallback
      fallback.parentNode.removeChild(fallback);
    } // Display previews in the previewsContainer element or the Dropzone element unless explicitly set to false


    if (_this.options.previewsContainer !== false) {
      if (_this.options.previewsContainer) {
        _this.previewsContainer = Dropzone.getElement(_this.options.previewsContainer, "previewsContainer");
      } else {
        _this.previewsContainer = _this.element;
      }
    }

    if (_this.options.clickable) {
      if (_this.options.clickable === true) {
        _this.clickableElements = [_this.element];
      } else {
        _this.clickableElements = Dropzone.getElements(_this.options.clickable, "clickable");
      }
    }

    _this.init();

    return _this;
  } // Returns all files that have been accepted


  _createClass(Dropzone, [{
    key: "getAcceptedFiles",
    value: function getAcceptedFiles() {
      return this.files.filter(function (file) {
        return file.accepted;
      }).map(function (file) {
        return file;
      });
    } // Returns all files that have been rejected
    // Not sure when that's going to be useful, but added for completeness.

  }, {
    key: "getRejectedFiles",
    value: function getRejectedFiles() {
      return this.files.filter(function (file) {
        return !file.accepted;
      }).map(function (file) {
        return file;
      });
    }
  }, {
    key: "getFilesWithStatus",
    value: function getFilesWithStatus(status) {
      return this.files.filter(function (file) {
        return file.status === status;
      }).map(function (file) {
        return file;
      });
    } // Returns all files that are in the queue

  }, {
    key: "getQueuedFiles",
    value: function getQueuedFiles() {
      return this.getFilesWithStatus(Dropzone.QUEUED);
    }
  }, {
    key: "getUploadingFiles",
    value: function getUploadingFiles() {
      return this.getFilesWithStatus(Dropzone.UPLOADING);
    }
  }, {
    key: "getAddedFiles",
    value: function getAddedFiles() {
      return this.getFilesWithStatus(Dropzone.ADDED);
    } // Files that are either queued or uploading

  }, {
    key: "getActiveFiles",
    value: function getActiveFiles() {
      return this.files.filter(function (file) {
        return file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED;
      }).map(function (file) {
        return file;
      });
    } // The function that gets called when Dropzone is initialized. You
    // can (and should) setup event listeners inside this function.

  }, {
    key: "init",
    value: function init() {
      var _this3 = this; // In case it isn't set already


      if (this.element.tagName === "form") {
        this.element.setAttribute("enctype", "multipart/form-data");
      }

      if (this.element.classList.contains("dropzone") && !this.element.querySelector(".dz-message")) {
        this.element.appendChild(Dropzone.createElement("<div class=\"dz-default dz-message\"><span>" + this.options.dictDefaultMessage + "</span></div>"));
      }

      if (this.clickableElements.length) {
        var setupHiddenFileInput = function setupHiddenFileInput() {
          if (_this3.hiddenFileInput) {
            _this3.hiddenFileInput.parentNode.removeChild(_this3.hiddenFileInput);
          }

          _this3.hiddenFileInput = document.createElement("input");

          _this3.hiddenFileInput.setAttribute("type", "file");

          if (_this3.options.maxFiles === null || _this3.options.maxFiles > 1) {
            _this3.hiddenFileInput.setAttribute("multiple", "multiple");
          }

          _this3.hiddenFileInput.className = "dz-hidden-input";

          if (_this3.options.acceptedFiles !== null) {
            _this3.hiddenFileInput.setAttribute("accept", _this3.options.acceptedFiles);
          }

          if (_this3.options.capture !== null) {
            _this3.hiddenFileInput.setAttribute("capture", _this3.options.capture);
          } // Not setting `display="none"` because some browsers don't accept clicks
          // on elements that aren't displayed.


          _this3.hiddenFileInput.style.visibility = "hidden";
          _this3.hiddenFileInput.style.position = "absolute";
          _this3.hiddenFileInput.style.top = "0";
          _this3.hiddenFileInput.style.left = "0";
          _this3.hiddenFileInput.style.height = "0";
          _this3.hiddenFileInput.style.width = "0";
          Dropzone.getElement(_this3.options.hiddenInputContainer, 'hiddenInputContainer').appendChild(_this3.hiddenFileInput);
          return _this3.hiddenFileInput.addEventListener("change", function () {
            var files = _this3.hiddenFileInput.files;

            if (files.length) {
              for (var _iterator10 = files, _isArray10 = true, _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator]();;) {
                var _ref9;

                if (_isArray10) {
                  if (_i10 >= _iterator10.length) break;
                  _ref9 = _iterator10[_i10++];
                } else {
                  _i10 = _iterator10.next();
                  if (_i10.done) break;
                  _ref9 = _i10.value;
                }

                var file = _ref9;

                _this3.addFile(file);
              }
            }

            _this3.emit("addedfiles", files);

            return setupHiddenFileInput();
          });
        };

        setupHiddenFileInput();
      }

      this.URL = window.URL !== null ? window.URL : window.webkitURL; // Setup all event listeners on the Dropzone object itself.
      // They're not in @setupEventListeners() because they shouldn't be removed
      // again when the dropzone gets disabled.

      for (var _iterator11 = this.events, _isArray11 = true, _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : _iterator11[Symbol.iterator]();;) {
        var _ref10;

        if (_isArray11) {
          if (_i11 >= _iterator11.length) break;
          _ref10 = _iterator11[_i11++];
        } else {
          _i11 = _iterator11.next();
          if (_i11.done) break;
          _ref10 = _i11.value;
        }

        var eventName = _ref10;
        this.on(eventName, this.options[eventName]);
      }

      this.on("uploadprogress", function () {
        return _this3.updateTotalUploadProgress();
      });
      this.on("removedfile", function () {
        return _this3.updateTotalUploadProgress();
      });
      this.on("canceled", function (file) {
        return _this3.emit("complete", file);
      }); // Emit a `queuecomplete` event if all files finished uploading.

      this.on("complete", function (file) {
        if (_this3.getAddedFiles().length === 0 && _this3.getUploadingFiles().length === 0 && _this3.getQueuedFiles().length === 0) {
          // This needs to be deferred so that `queuecomplete` really triggers after `complete`
          return setTimeout(function () {
            return _this3.emit("queuecomplete");
          }, 0);
        }
      });

      var noPropagation = function noPropagation(e) {
        e.stopPropagation();

        if (e.preventDefault) {
          return e.preventDefault();
        } else {
          return e.returnValue = false;
        }
      }; // Create the listeners


      this.listeners = [{
        element: this.element,
        events: {
          "dragstart": function dragstart(e) {
            return _this3.emit("dragstart", e);
          },
          "dragenter": function dragenter(e) {
            noPropagation(e);
            return _this3.emit("dragenter", e);
          },
          "dragover": function dragover(e) {
            // Makes it possible to drag files from chrome's download bar
            // http://stackoverflow.com/questions/19526430/drag-and-drop-file-uploads-from-chrome-downloads-bar
            // Try is required to prevent bug in Internet Explorer 11 (SCRIPT65535 exception)
            var efct = void 0;

            try {
              efct = e.dataTransfer.effectAllowed;
            } catch (error) {}

            e.dataTransfer.dropEffect = 'move' === efct || 'linkMove' === efct ? 'move' : 'copy';
            noPropagation(e);
            return _this3.emit("dragover", e);
          },
          "dragleave": function dragleave(e) {
            return _this3.emit("dragleave", e);
          },
          "drop": function drop(e) {
            noPropagation(e);
            return _this3.drop(e);
          },
          "dragend": function dragend(e) {
            return _this3.emit("dragend", e);
          } // This is disabled right now, because the browsers don't implement it properly.
          // "paste": (e) =>
          //   noPropagation e
          //   @paste e

        }
      }];
      this.clickableElements.forEach(function (clickableElement) {
        return _this3.listeners.push({
          element: clickableElement,
          events: {
            "click": function click(evt) {
              // Only the actual dropzone or the message element should trigger file selection
              if (clickableElement !== _this3.element || evt.target === _this3.element || Dropzone.elementInside(evt.target, _this3.element.querySelector(".dz-message"))) {
                _this3.hiddenFileInput.click(); // Forward the click

              }

              return true;
            }
          }
        });
      });
      this.enable();
      return this.options.init.call(this);
    } // Not fully tested yet

  }, {
    key: "destroy",
    value: function destroy() {
      this.disable();
      this.removeAllFiles(true);

      if (this.hiddenFileInput != null ? this.hiddenFileInput.parentNode : undefined) {
        this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);
        this.hiddenFileInput = null;
      }

      delete this.element.dropzone;
      return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1);
    }
  }, {
    key: "updateTotalUploadProgress",
    value: function updateTotalUploadProgress() {
      var totalUploadProgress = void 0;
      var totalBytesSent = 0;
      var totalBytes = 0;
      var activeFiles = this.getActiveFiles();

      if (activeFiles.length) {
        for (var _iterator12 = this.getActiveFiles(), _isArray12 = true, _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : _iterator12[Symbol.iterator]();;) {
          var _ref11;

          if (_isArray12) {
            if (_i12 >= _iterator12.length) break;
            _ref11 = _iterator12[_i12++];
          } else {
            _i12 = _iterator12.next();
            if (_i12.done) break;
            _ref11 = _i12.value;
          }

          var file = _ref11;
          totalBytesSent += file.upload.bytesSent;
          totalBytes += file.upload.total;
        }

        totalUploadProgress = 100 * totalBytesSent / totalBytes;
      } else {
        totalUploadProgress = 100;
      }

      return this.emit("totaluploadprogress", totalUploadProgress, totalBytes, totalBytesSent);
    } // @options.paramName can be a function taking one parameter rather than a string.
    // A parameter name for a file is obtained simply by calling this with an index number.

  }, {
    key: "_getParamName",
    value: function _getParamName(n) {
      if (typeof this.options.paramName === "function") {
        return this.options.paramName(n);
      } else {
        return "" + this.options.paramName + (this.options.uploadMultiple ? "[" + n + "]" : "");
      }
    } // If @options.renameFile is a function,
    // the function will be used to rename the file.name before appending it to the formData

  }, {
    key: "_renameFile",
    value: function _renameFile(file) {
      if (typeof this.options.renameFile !== "function") {
        return file.name;
      }

      return this.options.renameFile(file);
    } // Returns a form that can be used as fallback if the browser does not support DragnDrop
    //
    // If the dropzone is already a form, only the input field and button are returned. Otherwise a complete form element is provided.
    // This code has to pass in IE7 :(

  }, {
    key: "getFallbackForm",
    value: function getFallbackForm() {
      var existingFallback = void 0,
          form = void 0;

      if (existingFallback = this.getExistingFallback()) {
        return existingFallback;
      }

      var fieldsString = "<div class=\"dz-fallback\">";

      if (this.options.dictFallbackText) {
        fieldsString += "<p>" + this.options.dictFallbackText + "</p>";
      }

      fieldsString += "<input type=\"file\" name=\"" + this._getParamName(0) + "\" " + (this.options.uploadMultiple ? 'multiple="multiple"' : undefined) + " /><input type=\"submit\" value=\"Upload!\"></div>";
      var fields = Dropzone.createElement(fieldsString);

      if (this.element.tagName !== "FORM") {
        form = Dropzone.createElement("<form action=\"" + this.options.url + "\" enctype=\"multipart/form-data\" method=\"" + this.options.method + "\"></form>");
        form.appendChild(fields);
      } else {
        // Make sure that the enctype and method attributes are set properly
        this.element.setAttribute("enctype", "multipart/form-data");
        this.element.setAttribute("method", this.options.method);
      }

      return form != null ? form : fields;
    } // Returns the fallback elements if they exist already
    //
    // This code has to pass in IE7 :(

  }, {
    key: "getExistingFallback",
    value: function getExistingFallback() {
      var getFallback = function getFallback(elements) {
        for (var _iterator13 = elements, _isArray13 = true, _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : _iterator13[Symbol.iterator]();;) {
          var _ref12;

          if (_isArray13) {
            if (_i13 >= _iterator13.length) break;
            _ref12 = _iterator13[_i13++];
          } else {
            _i13 = _iterator13.next();
            if (_i13.done) break;
            _ref12 = _i13.value;
          }

          var el = _ref12;

          if (/(^| )fallback($| )/.test(el.className)) {
            return el;
          }
        }
      };

      var _arr = ["div", "form"];

      for (var _i14 = 0; _i14 < _arr.length; _i14++) {
        var tagName = _arr[_i14];
        var fallback;

        if (fallback = getFallback(this.element.getElementsByTagName(tagName))) {
          return fallback;
        }
      }
    } // Activates all listeners stored in @listeners

  }, {
    key: "setupEventListeners",
    value: function setupEventListeners() {
      return this.listeners.map(function (elementListeners) {
        return function () {
          var result = [];

          for (var event in elementListeners.events) {
            var listener = elementListeners.events[event];
            result.push(elementListeners.element.addEventListener(event, listener, false));
          }

          return result;
        }();
      });
    } // Deactivates all listeners stored in @listeners

  }, {
    key: "removeEventListeners",
    value: function removeEventListeners() {
      return this.listeners.map(function (elementListeners) {
        return function () {
          var result = [];

          for (var event in elementListeners.events) {
            var listener = elementListeners.events[event];
            result.push(elementListeners.element.removeEventListener(event, listener, false));
          }

          return result;
        }();
      });
    } // Removes all event listeners and cancels all files in the queue or being processed.

  }, {
    key: "disable",
    value: function disable() {
      var _this4 = this;

      this.clickableElements.forEach(function (element) {
        return element.classList.remove("dz-clickable");
      });
      this.removeEventListeners();
      this.disabled = true;
      return this.files.map(function (file) {
        return _this4.cancelUpload(file);
      });
    }
  }, {
    key: "enable",
    value: function enable() {
      delete this.disabled;
      this.clickableElements.forEach(function (element) {
        return element.classList.add("dz-clickable");
      });
      return this.setupEventListeners();
    } // Returns a nicely formatted filesize

  }, {
    key: "filesize",
    value: function filesize(size) {
      var selectedSize = 0;
      var selectedUnit = "b";

      if (size > 0) {
        var units = ['tb', 'gb', 'mb', 'kb', 'b'];

        for (var i = 0; i < units.length; i++) {
          var unit = units[i];
          var cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;

          if (size >= cutoff) {
            selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);
            selectedUnit = unit;
            break;
          }
        }

        selectedSize = Math.round(10 * selectedSize) / 10; // Cutting of digits
      }

      return "<strong>" + selectedSize + "</strong> " + this.options.dictFileSizeUnits[selectedUnit];
    } // Adds or removes the `dz-max-files-reached` class from the form.

  }, {
    key: "_updateMaxFilesReachedClass",
    value: function _updateMaxFilesReachedClass() {
      if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) {
        if (this.getAcceptedFiles().length === this.options.maxFiles) {
          this.emit('maxfilesreached', this.files);
        }

        return this.element.classList.add("dz-max-files-reached");
      } else {
        return this.element.classList.remove("dz-max-files-reached");
      }
    }
  }, {
    key: "drop",
    value: function drop(e) {
      if (!e.dataTransfer) {
        return;
      }

      this.emit("drop", e); // Convert the FileList to an Array
      // This is necessary for IE11

      var files = [];

      for (var i = 0; i < e.dataTransfer.files.length; i++) {
        files[i] = e.dataTransfer.files[i];
      }

      this.emit("addedfiles", files); // Even if it's a folder, files.length will contain the folders.

      if (files.length) {
        var items = e.dataTransfer.items;

        if (items && items.length && items[0].webkitGetAsEntry != null) {
          // The browser supports dropping of folders, so handle items instead of files
          this._addFilesFromItems(items);
        } else {
          this.handleFiles(files);
        }
      }
    }
  }, {
    key: "paste",
    value: function paste(e) {
      if (__guard__(e != null ? e.clipboardData : undefined, function (x) {
        return x.items;
      }) == null) {
        return;
      }

      this.emit("paste", e);
      var items = e.clipboardData.items;

      if (items.length) {
        return this._addFilesFromItems(items);
      }
    }
  }, {
    key: "handleFiles",
    value: function handleFiles(files) {
      for (var _iterator14 = files, _isArray14 = true, _i15 = 0, _iterator14 = _isArray14 ? _iterator14 : _iterator14[Symbol.iterator]();;) {
        var _ref13;

        if (_isArray14) {
          if (_i15 >= _iterator14.length) break;
          _ref13 = _iterator14[_i15++];
        } else {
          _i15 = _iterator14.next();
          if (_i15.done) break;
          _ref13 = _i15.value;
        }

        var file = _ref13;
        this.addFile(file);
      }
    } // When a folder is dropped (or files are pasted), items must be handled
    // instead of files.

  }, {
    key: "_addFilesFromItems",
    value: function _addFilesFromItems(items) {
      var _this5 = this;

      return function () {
        var result = [];

        for (var _iterator15 = items, _isArray15 = true, _i16 = 0, _iterator15 = _isArray15 ? _iterator15 : _iterator15[Symbol.iterator]();;) {
          var _ref14;

          if (_isArray15) {
            if (_i16 >= _iterator15.length) break;
            _ref14 = _iterator15[_i16++];
          } else {
            _i16 = _iterator15.next();
            if (_i16.done) break;
            _ref14 = _i16.value;
          }

          var item = _ref14;
          var entry;

          if (item.webkitGetAsEntry != null && (entry = item.webkitGetAsEntry())) {
            if (entry.isFile) {
              result.push(_this5.addFile(item.getAsFile()));
            } else if (entry.isDirectory) {
              // Append all files from that directory to files
              result.push(_this5._addFilesFromDirectory(entry, entry.name));
            } else {
              result.push(undefined);
            }
          } else if (item.getAsFile != null) {
            if (item.kind == null || item.kind === "file") {
              result.push(_this5.addFile(item.getAsFile()));
            } else {
              result.push(undefined);
            }
          } else {
            result.push(undefined);
          }
        }

        return result;
      }();
    } // Goes through the directory, and adds each file it finds recursively

  }, {
    key: "_addFilesFromDirectory",
    value: function _addFilesFromDirectory(directory, path) {
      var _this6 = this;

      var dirReader = directory.createReader();

      var errorHandler = function errorHandler(error) {
        return __guardMethod__(console, 'log', function (o) {
          return o.log(error);
        });
      };

      var readEntries = function readEntries() {
        return dirReader.readEntries(function (entries) {
          if (entries.length > 0) {
            for (var _iterator16 = entries, _isArray16 = true, _i17 = 0, _iterator16 = _isArray16 ? _iterator16 : _iterator16[Symbol.iterator]();;) {
              var _ref15;

              if (_isArray16) {
                if (_i17 >= _iterator16.length) break;
                _ref15 = _iterator16[_i17++];
              } else {
                _i17 = _iterator16.next();
                if (_i17.done) break;
                _ref15 = _i17.value;
              }

              var entry = _ref15;

              if (entry.isFile) {
                entry.file(function (file) {
                  if (_this6.options.ignoreHiddenFiles && file.name.substring(0, 1) === '.') {
                    return;
                  }

                  file.fullPath = path + "/" + file.name;
                  return _this6.addFile(file);
                });
              } else if (entry.isDirectory) {
                _this6._addFilesFromDirectory(entry, path + "/" + entry.name);
              }
            } // Recursively call readEntries() again, since browser only handle
            // the first 100 entries.
            // See: https://developer.mozilla.org/en-US/docs/Web/API/DirectoryReader#readEntries


            readEntries();
          }

          return null;
        }, errorHandler);
      };

      return readEntries();
    } // If `done()` is called without argument the file is accepted
    // If you call it with an error message, the file is rejected
    // (This allows for asynchronous validation)
    //
    // This function checks the filesize, and if the file.type passes the
    // `acceptedFiles` check.

  }, {
    key: "accept",
    value: function accept(file, done) {
      if (this.options.maxFilesize && file.size > this.options.maxFilesize * 1024 * 1024) {
        return done(this.options.dictFileTooBig.replace("{{filesize}}", Math.round(file.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", this.options.maxFilesize));
      } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) {
        return done(this.options.dictInvalidFileType);
      } else if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) {
        done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}", this.options.maxFiles));
        return this.emit("maxfilesexceeded", file);
      } else {
        return this.options.accept.call(this, file, done);
      }
    }
  }, {
    key: "addFile",
    value: function addFile(file) {
      var _this7 = this;

      file.upload = {
        uuid: Dropzone.uuidv4(),
        progress: 0,
        // Setting the total upload size to file.size for the beginning
        // It's actual different than the size to be transmitted.
        total: file.size,
        bytesSent: 0,
        filename: this._renameFile(file),
        chunked: this.options.chunking && (this.options.forceChunking || file.size > this.options.chunkSize),
        totalChunkCount: Math.ceil(file.size / this.options.chunkSize)
      };
      this.files.push(file);
      file.status = Dropzone.ADDED;
      this.emit("addedfile", file);

      this._enqueueThumbnail(file);

      return this.accept(file, function (error) {
        if (error) {
          file.accepted = false;

          _this7._errorProcessing([file], error); // Will set the file.status

        } else {
          file.accepted = true;

          if (_this7.options.autoQueue) {
            _this7.enqueueFile(file);
          } // Will set .accepted = true

        }

        return _this7._updateMaxFilesReachedClass();
      });
    } // Wrapper for enqueueFile

  }, {
    key: "enqueueFiles",
    value: function enqueueFiles(files) {
      for (var _iterator17 = files, _isArray17 = true, _i18 = 0, _iterator17 = _isArray17 ? _iterator17 : _iterator17[Symbol.iterator]();;) {
        var _ref16;

        if (_isArray17) {
          if (_i18 >= _iterator17.length) break;
          _ref16 = _iterator17[_i18++];
        } else {
          _i18 = _iterator17.next();
          if (_i18.done) break;
          _ref16 = _i18.value;
        }

        var file = _ref16;
        this.enqueueFile(file);
      }

      return null;
    }
  }, {
    key: "enqueueFile",
    value: function enqueueFile(file) {
      var _this8 = this;

      if (file.status === Dropzone.ADDED && file.accepted === true) {
        file.status = Dropzone.QUEUED;

        if (this.options.autoProcessQueue) {
          return setTimeout(function () {
            return _this8.processQueue();
          }, 0); // Deferring the call
        }
      } else {
        throw new Error("This file can't be queued because it has already been processed or was rejected.");
      }
    }
  }, {
    key: "_enqueueThumbnail",
    value: function _enqueueThumbnail(file) {
      var _this9 = this;

      if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) {
        this._thumbnailQueue.push(file);

        return setTimeout(function () {
          return _this9._processThumbnailQueue();
        }, 0); // Deferring the call
      }
    }
  }, {
    key: "_processThumbnailQueue",
    value: function _processThumbnailQueue() {
      var _this10 = this;

      if (this._processingThumbnail || this._thumbnailQueue.length === 0) {
        return;
      }

      this._processingThumbnail = true;

      var file = this._thumbnailQueue.shift();

      return this.createThumbnail(file, this.options.thumbnailWidth, this.options.thumbnailHeight, this.options.thumbnailMethod, true, function (dataUrl) {
        _this10.emit("thumbnail", file, dataUrl);

        _this10._processingThumbnail = false;
        return _this10._processThumbnailQueue();
      });
    } // Can be called by the user to remove a file

  }, {
    key: "removeFile",
    value: function removeFile(file) {
      if (file.status === Dropzone.UPLOADING) {
        this.cancelUpload(file);
      }

      this.files = without(this.files, file);
      this.emit("removedfile", file);

      if (this.files.length === 0) {
        return this.emit("reset");
      }
    } // Removes all files that aren't currently processed from the list

  }, {
    key: "removeAllFiles",
    value: function removeAllFiles(cancelIfNecessary) {
      // Create a copy of files since removeFile() changes the @files array.
      if (cancelIfNecessary == null) {
        cancelIfNecessary = false;
      }

      for (var _iterator18 = this.files.slice(), _isArray18 = true, _i19 = 0, _iterator18 = _isArray18 ? _iterator18 : _iterator18[Symbol.iterator]();;) {
        var _ref17;

        if (_isArray18) {
          if (_i19 >= _iterator18.length) break;
          _ref17 = _iterator18[_i19++];
        } else {
          _i19 = _iterator18.next();
          if (_i19.done) break;
          _ref17 = _i19.value;
        }

        var file = _ref17;

        if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) {
          this.removeFile(file);
        }
      }

      return null;
    } // Resizes an image before it gets sent to the server. This function is the default behavior of
    // `options.transformFile` if `resizeWidth` or `resizeHeight` are set. The callback is invoked with
    // the resized blob.

  }, {
    key: "resizeImage",
    value: function resizeImage(file, width, height, resizeMethod, callback) {
      var _this11 = this;

      return this.createThumbnail(file, width, height, resizeMethod, true, function (dataUrl, canvas) {
        if (canvas == null) {
          // The image has not been resized
          return callback(file);
        } else {
          var resizeMimeType = _this11.options.resizeMimeType;

          if (resizeMimeType == null) {
            resizeMimeType = file.type;
          }

          var resizedDataURL = canvas.toDataURL(resizeMimeType, _this11.options.resizeQuality);

          if (resizeMimeType === 'image/jpeg' || resizeMimeType === 'image/jpg') {
            // Now add the original EXIF information
            resizedDataURL = ExifRestore.restore(file.dataURL, resizedDataURL);
          }

          return callback(Dropzone.dataURItoBlob(resizedDataURL));
        }
      });
    }
  }, {
    key: "createThumbnail",
    value: function createThumbnail(file, width, height, resizeMethod, fixOrientation, callback) {
      var _this12 = this;

      var fileReader = new FileReader();

      fileReader.onload = function () {
        file.dataURL = fileReader.result; // Don't bother creating a thumbnail for SVG images since they're vector

        if (file.type === "image/svg+xml") {
          if (callback != null) {
            callback(fileReader.result);
          }

          return;
        }

        return _this12.createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback);
      };

      return fileReader.readAsDataURL(file);
    }
  }, {
    key: "createThumbnailFromUrl",
    value: function createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback, crossOrigin) {
      var _this13 = this; // Not using `new Image` here because of a bug in latest Chrome versions.
      // See https://github.com/enyo/dropzone/pull/226


      var img = document.createElement("img");

      if (crossOrigin) {
        img.crossOrigin = crossOrigin;
      }

      img.onload = function () {
        var loadExif = function loadExif(callback) {
          return callback(1);
        };

        if (typeof EXIF !== 'undefined' && EXIF !== null && fixOrientation) {
          loadExif = function loadExif(callback) {
            return EXIF.getData(img, function () {
              return callback(EXIF.getTag(this, 'Orientation'));
            });
          };
        }

        return loadExif(function (orientation) {
          file.width = img.width;
          file.height = img.height;

          var resizeInfo = _this13.options.resize.call(_this13, file, width, height, resizeMethod);

          var canvas = document.createElement("canvas");
          var ctx = canvas.getContext("2d");
          canvas.width = resizeInfo.trgWidth;
          canvas.height = resizeInfo.trgHeight;

          if (orientation > 4) {
            canvas.width = resizeInfo.trgHeight;
            canvas.height = resizeInfo.trgWidth;
          }

          switch (orientation) {
            case 2:
              // horizontal flip
              ctx.translate(canvas.width, 0);
              ctx.scale(-1, 1);
              break;

            case 3:
              // 180° rotate left
              ctx.translate(canvas.width, canvas.height);
              ctx.rotate(Math.PI);
              break;

            case 4:
              // vertical flip
              ctx.translate(0, canvas.height);
              ctx.scale(1, -1);
              break;

            case 5:
              // vertical flip + 90 rotate right
              ctx.rotate(0.5 * Math.PI);
              ctx.scale(1, -1);
              break;

            case 6:
              // 90° rotate right
              ctx.rotate(0.5 * Math.PI);
              ctx.translate(0, -canvas.width);
              break;

            case 7:
              // horizontal flip + 90 rotate right
              ctx.rotate(0.5 * Math.PI);
              ctx.translate(canvas.height, -canvas.width);
              ctx.scale(-1, 1);
              break;

            case 8:
              // 90° rotate left
              ctx.rotate(-0.5 * Math.PI);
              ctx.translate(-canvas.height, 0);
              break;
          } // This is a bugfix for iOS' scaling bug.


          drawImageIOSFix(ctx, img, resizeInfo.srcX != null ? resizeInfo.srcX : 0, resizeInfo.srcY != null ? resizeInfo.srcY : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, resizeInfo.trgX != null ? resizeInfo.trgX : 0, resizeInfo.trgY != null ? resizeInfo.trgY : 0, resizeInfo.trgWidth, resizeInfo.trgHeight);
          var thumbnail = canvas.toDataURL("image/png");

          if (callback != null) {
            return callback(thumbnail, canvas);
          }
        });
      };

      if (callback != null) {
        img.onerror = callback;
      }

      return img.src = file.dataURL;
    } // Goes through the queue and processes files if there aren't too many already.

  }, {
    key: "processQueue",
    value: function processQueue() {
      var parallelUploads = this.options.parallelUploads;
      var processingLength = this.getUploadingFiles().length;
      var i = processingLength; // There are already at least as many files uploading than should be

      if (processingLength >= parallelUploads) {
        return;
      }

      var queuedFiles = this.getQueuedFiles();

      if (!(queuedFiles.length > 0)) {
        return;
      }

      if (this.options.uploadMultiple) {
        // The files should be uploaded in one request
        return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength));
      } else {
        while (i < parallelUploads) {
          if (!queuedFiles.length) {
            return;
          } // Nothing left to process


          this.processFile(queuedFiles.shift());
          i++;
        }
      }
    } // Wrapper for `processFiles`

  }, {
    key: "processFile",
    value: function processFile(file) {
      return this.processFiles([file]);
    } // Loads the file, then calls finishedLoading()

  }, {
    key: "processFiles",
    value: function processFiles(files) {
      for (var _iterator19 = files, _isArray19 = true, _i20 = 0, _iterator19 = _isArray19 ? _iterator19 : _iterator19[Symbol.iterator]();;) {
        var _ref18;

        if (_isArray19) {
          if (_i20 >= _iterator19.length) break;
          _ref18 = _iterator19[_i20++];
        } else {
          _i20 = _iterator19.next();
          if (_i20.done) break;
          _ref18 = _i20.value;
        }

        var file = _ref18;
        file.processing = true; // Backwards compatibility

        file.status = Dropzone.UPLOADING;
        this.emit("processing", file);
      }

      if (this.options.uploadMultiple) {
        this.emit("processingmultiple", files);
      }

      return this.uploadFiles(files);
    }
  }, {
    key: "_getFilesWithXhr",
    value: function _getFilesWithXhr(xhr) {
      var files = void 0;
      return files = this.files.filter(function (file) {
        return file.xhr === xhr;
      }).map(function (file) {
        return file;
      });
    } // Cancels the file upload and sets the status to CANCELED
    // **if** the file is actually being uploaded.
    // If it's still in the queue, the file is being removed from it and the status
    // set to CANCELED.

  }, {
    key: "cancelUpload",
    value: function cancelUpload(file) {
      if (file.status === Dropzone.UPLOADING) {
        var groupedFiles = this._getFilesWithXhr(file.xhr);

        for (var _iterator20 = groupedFiles, _isArray20 = true, _i21 = 0, _iterator20 = _isArray20 ? _iterator20 : _iterator20[Symbol.iterator]();;) {
          var _ref19;

          if (_isArray20) {
            if (_i21 >= _iterator20.length) break;
            _ref19 = _iterator20[_i21++];
          } else {
            _i21 = _iterator20.next();
            if (_i21.done) break;
            _ref19 = _i21.value;
          }

          var groupedFile = _ref19;
          groupedFile.status = Dropzone.CANCELED;
        }

        if (typeof file.xhr !== 'undefined') {
          file.xhr.abort();
        }

        for (var _iterator21 = groupedFiles, _isArray21 = true, _i22 = 0, _iterator21 = _isArray21 ? _iterator21 : _iterator21[Symbol.iterator]();;) {
          var _ref20;

          if (_isArray21) {
            if (_i22 >= _iterator21.length) break;
            _ref20 = _iterator21[_i22++];
          } else {
            _i22 = _iterator21.next();
            if (_i22.done) break;
            _ref20 = _i22.value;
          }

          var _groupedFile = _ref20;
          this.emit("canceled", _groupedFile);
        }

        if (this.options.uploadMultiple) {
          this.emit("canceledmultiple", groupedFiles);
        }
      } else if (file.status === Dropzone.ADDED || file.status === Dropzone.QUEUED) {
        file.status = Dropzone.CANCELED;
        this.emit("canceled", file);

        if (this.options.uploadMultiple) {
          this.emit("canceledmultiple", [file]);
        }
      }

      if (this.options.autoProcessQueue) {
        return this.processQueue();
      }
    }
  }, {
    key: "resolveOption",
    value: function resolveOption(option) {
      if (typeof option === 'function') {
        for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
          args[_key3 - 1] = arguments[_key3];
        }

        return option.apply(this, args);
      }

      return option;
    }
  }, {
    key: "uploadFile",
    value: function uploadFile(file) {
      return this.uploadFiles([file]);
    }
  }, {
    key: "uploadFiles",
    value: function uploadFiles(files) {
      var _this14 = this;

      this._transformFiles(files, function (transformedFiles) {
        if (files[0].upload.chunked) {
          // This file should be sent in chunks!
          // If the chunking option is set, we **know** that there can only be **one** file, since
          // uploadMultiple is not allowed with this option.
          var file = files[0];
          var transformedFile = transformedFiles[0];
          var startedChunkCount = 0;
          file.upload.chunks = [];

          var handleNextChunk = function handleNextChunk() {
            var chunkIndex = 0; // Find the next item in file.upload.chunks that is not defined yet.

            while (file.upload.chunks[chunkIndex] !== undefined) {
              chunkIndex++;
            } // This means, that all chunks have already been started.


            if (chunkIndex >= file.upload.totalChunkCount) return;
            startedChunkCount++;
            var start = chunkIndex * _this14.options.chunkSize;
            var end = Math.min(start + _this14.options.chunkSize, file.size);
            var dataBlock = {
              name: _this14._getParamName(0),
              data: transformedFile.webkitSlice ? transformedFile.webkitSlice(start, end) : transformedFile.slice(start, end),
              filename: file.upload.filename,
              chunkIndex: chunkIndex
            };
            file.upload.chunks[chunkIndex] = {
              file: file,
              index: chunkIndex,
              dataBlock: dataBlock,
              // In case we want to retry.
              status: Dropzone.UPLOADING,
              progress: 0,
              retries: 0 // The number of times this block has been retried.

            };

            _this14._uploadData(files, [dataBlock]);
          };

          file.upload.finishedChunkUpload = function (chunk) {
            var allFinished = true;
            chunk.status = Dropzone.SUCCESS; // Clear the data from the chunk

            chunk.dataBlock = null; // Leaving this reference to xhr intact here will cause memory leaks in some browsers

            chunk.xhr = null;

            for (var i = 0; i < file.upload.totalChunkCount; i++) {
              if (file.upload.chunks[i] === undefined) {
                return handleNextChunk();
              }

              if (file.upload.chunks[i].status !== Dropzone.SUCCESS) {
                allFinished = false;
              }
            }

            if (allFinished) {
              _this14.options.chunksUploaded(file, function () {
                _this14._finished(files, '', null);
              });
            }
          };

          if (_this14.options.parallelChunkUploads) {
            for (var i = 0; i < file.upload.totalChunkCount; i++) {
              handleNextChunk();
            }
          } else {
            handleNextChunk();
          }
        } else {
          var dataBlocks = [];

          for (var _i23 = 0; _i23 < files.length; _i23++) {
            dataBlocks[_i23] = {
              name: _this14._getParamName(_i23),
              data: transformedFiles[_i23],
              filename: files[_i23].upload.filename
            };
          }

          _this14._uploadData(files, dataBlocks);
        }
      });
    } /// Returns the right chunk for given file and xhr

  }, {
    key: "_getChunk",
    value: function _getChunk(file, xhr) {
      for (var i = 0; i < file.upload.totalChunkCount; i++) {
        if (file.upload.chunks[i] !== undefined && file.upload.chunks[i].xhr === xhr) {
          return file.upload.chunks[i];
        }
      }
    } // This function actually uploads the file(s) to the server.
    // If dataBlocks contains the actual data to upload (meaning, that this could either be transformed
    // files, or individual chunks for chunked upload).

  }, {
    key: "_uploadData",
    value: function _uploadData(files, dataBlocks) {
      var _this15 = this;

      var xhr = new XMLHttpRequest(); // Put the xhr object in the file objects to be able to reference it later.

      for (var _iterator22 = files, _isArray22 = true, _i24 = 0, _iterator22 = _isArray22 ? _iterator22 : _iterator22[Symbol.iterator]();;) {
        var _ref21;

        if (_isArray22) {
          if (_i24 >= _iterator22.length) break;
          _ref21 = _iterator22[_i24++];
        } else {
          _i24 = _iterator22.next();
          if (_i24.done) break;
          _ref21 = _i24.value;
        }

        var file = _ref21;
        file.xhr = xhr;
      }

      if (files[0].upload.chunked) {
        // Put the xhr object in the right chunk object, so it can be associated later, and found with _getChunk
        files[0].upload.chunks[dataBlocks[0].chunkIndex].xhr = xhr;
      }

      var method = this.resolveOption(this.options.method, files);
      var url = this.resolveOption(this.options.url, files);
      xhr.open(method, url, true); // Setting the timeout after open because of IE11 issue: https://gitlab.com/meno/dropzone/issues/8

      xhr.timeout = this.resolveOption(this.options.timeout, files); // Has to be after `.open()`. See https://github.com/enyo/dropzone/issues/179

      xhr.withCredentials = !!this.options.withCredentials;

      xhr.onload = function (e) {
        _this15._finishedUploading(files, xhr, e);
      };

      xhr.onerror = function () {
        _this15._handleUploadError(files, xhr);
      }; // Some browsers do not have the .upload property


      var progressObj = xhr.upload != null ? xhr.upload : xhr;

      progressObj.onprogress = function (e) {
        return _this15._updateFilesUploadProgress(files, xhr, e);
      };

      var headers = {
        "Accept": "application/json",
        "Cache-Control": "no-cache",
        "X-Requested-With": "XMLHttpRequest"
      };

      if (this.options.headers) {
        Dropzone.extend(headers, this.options.headers);
      }

      for (var headerName in headers) {
        var headerValue = headers[headerName];

        if (headerValue) {
          xhr.setRequestHeader(headerName, headerValue);
        }
      }

      var formData = new FormData(); // Adding all @options parameters

      if (this.options.params) {
        var additionalParams = this.options.params;

        if (typeof additionalParams === 'function') {
          additionalParams = additionalParams.call(this, files, xhr, files[0].upload.chunked ? this._getChunk(files[0], xhr) : null);
        }

        for (var key in additionalParams) {
          var value = additionalParams[key];
          formData.append(key, value);
        }
      } // Let the user add additional data if necessary


      for (var _iterator23 = files, _isArray23 = true, _i25 = 0, _iterator23 = _isArray23 ? _iterator23 : _iterator23[Symbol.iterator]();;) {
        var _ref22;

        if (_isArray23) {
          if (_i25 >= _iterator23.length) break;
          _ref22 = _iterator23[_i25++];
        } else {
          _i25 = _iterator23.next();
          if (_i25.done) break;
          _ref22 = _i25.value;
        }

        var _file = _ref22;
        this.emit("sending", _file, xhr, formData);
      }

      if (this.options.uploadMultiple) {
        this.emit("sendingmultiple", files, xhr, formData);
      }

      this._addFormElementData(formData); // Finally add the files
      // Has to be last because some servers (eg: S3) expect the file to be the last parameter


      for (var i = 0; i < dataBlocks.length; i++) {
        var dataBlock = dataBlocks[i];
        formData.append(dataBlock.name, dataBlock.data, dataBlock.filename);
      }

      this.submitRequest(xhr, formData, files);
    } // Transforms all files with this.options.transformFile and invokes done with the transformed files when done.

  }, {
    key: "_transformFiles",
    value: function _transformFiles(files, done) {
      var _this16 = this;

      var transformedFiles = []; // Clumsy way of handling asynchronous calls, until I get to add a proper Future library.

      var doneCounter = 0;

      var _loop = function _loop(i) {
        _this16.options.transformFile.call(_this16, files[i], function (transformedFile) {
          transformedFiles[i] = transformedFile;

          if (++doneCounter === files.length) {
            done(transformedFiles);
          }
        });
      };

      for (var i = 0; i < files.length; i++) {
        _loop(i);
      }
    } // Takes care of adding other input elements of the form to the AJAX request

  }, {
    key: "_addFormElementData",
    value: function _addFormElementData(formData) {
      // Take care of other input elements
      if (this.element.tagName === "FORM") {
        for (var _iterator24 = this.element.querySelectorAll("input, textarea, select, button"), _isArray24 = true, _i26 = 0, _iterator24 = _isArray24 ? _iterator24 : _iterator24[Symbol.iterator]();;) {
          var _ref23;

          if (_isArray24) {
            if (_i26 >= _iterator24.length) break;
            _ref23 = _iterator24[_i26++];
          } else {
            _i26 = _iterator24.next();
            if (_i26.done) break;
            _ref23 = _i26.value;
          }

          var input = _ref23;
          var inputName = input.getAttribute("name");
          var inputType = input.getAttribute("type");
          if (inputType) inputType = inputType.toLowerCase(); // If the input doesn't have a name, we can't use it.

          if (typeof inputName === 'undefined' || inputName === null) continue;

          if (input.tagName === "SELECT" && input.hasAttribute("multiple")) {
            // Possibly multiple values
            for (var _iterator25 = input.options, _isArray25 = true, _i27 = 0, _iterator25 = _isArray25 ? _iterator25 : _iterator25[Symbol.iterator]();;) {
              var _ref24;

              if (_isArray25) {
                if (_i27 >= _iterator25.length) break;
                _ref24 = _iterator25[_i27++];
              } else {
                _i27 = _iterator25.next();
                if (_i27.done) break;
                _ref24 = _i27.value;
              }

              var option = _ref24;

              if (option.selected) {
                formData.append(inputName, option.value);
              }
            }
          } else if (!inputType || inputType !== "checkbox" && inputType !== "radio" || input.checked) {
            formData.append(inputName, input.value);
          }
        }
      }
    } // Invoked when there is new progress information about given files.
    // If e is not provided, it is assumed that the upload is finished.

  }, {
    key: "_updateFilesUploadProgress",
    value: function _updateFilesUploadProgress(files, xhr, e) {
      var progress = void 0;

      if (typeof e !== 'undefined') {
        progress = 100 * e.loaded / e.total;

        if (files[0].upload.chunked) {
          var file = files[0]; // Since this is a chunked upload, we need to update the appropriate chunk progress.

          var chunk = this._getChunk(file, xhr);

          chunk.progress = progress;
          chunk.total = e.total;
          chunk.bytesSent = e.loaded;
          var fileProgress = 0,
              fileTotal = void 0,
              fileBytesSent = void 0;
          file.upload.progress = 0;
          file.upload.total = 0;
          file.upload.bytesSent = 0;

          for (var i = 0; i < file.upload.totalChunkCount; i++) {
            if (file.upload.chunks[i] !== undefined && file.upload.chunks[i].progress !== undefined) {
              file.upload.progress += file.upload.chunks[i].progress;
              file.upload.total += file.upload.chunks[i].total;
              file.upload.bytesSent += file.upload.chunks[i].bytesSent;
            }
          }

          file.upload.progress = file.upload.progress / file.upload.totalChunkCount;
        } else {
          for (var _iterator26 = files, _isArray26 = true, _i28 = 0, _iterator26 = _isArray26 ? _iterator26 : _iterator26[Symbol.iterator]();;) {
            var _ref25;

            if (_isArray26) {
              if (_i28 >= _iterator26.length) break;
              _ref25 = _iterator26[_i28++];
            } else {
              _i28 = _iterator26.next();
              if (_i28.done) break;
              _ref25 = _i28.value;
            }

            var _file2 = _ref25;
            _file2.upload.progress = progress;
            _file2.upload.total = e.total;
            _file2.upload.bytesSent = e.loaded;
          }
        }

        for (var _iterator27 = files, _isArray27 = true, _i29 = 0, _iterator27 = _isArray27 ? _iterator27 : _iterator27[Symbol.iterator]();;) {
          var _ref26;

          if (_isArray27) {
            if (_i29 >= _iterator27.length) break;
            _ref26 = _iterator27[_i29++];
          } else {
            _i29 = _iterator27.next();
            if (_i29.done) break;
            _ref26 = _i29.value;
          }

          var _file3 = _ref26;
          this.emit("uploadprogress", _file3, _file3.upload.progress, _file3.upload.bytesSent);
        }
      } else {
        // Called when the file finished uploading
        var allFilesFinished = true;
        progress = 100;

        for (var _iterator28 = files, _isArray28 = true, _i30 = 0, _iterator28 = _isArray28 ? _iterator28 : _iterator28[Symbol.iterator]();;) {
          var _ref27;

          if (_isArray28) {
            if (_i30 >= _iterator28.length) break;
            _ref27 = _iterator28[_i30++];
          } else {
            _i30 = _iterator28.next();
            if (_i30.done) break;
            _ref27 = _i30.value;
          }

          var _file4 = _ref27;

          if (_file4.upload.progress !== 100 || _file4.upload.bytesSent !== _file4.upload.total) {
            allFilesFinished = false;
          }

          _file4.upload.progress = progress;
          _file4.upload.bytesSent = _file4.upload.total;
        } // Nothing to do, all files already at 100%


        if (allFilesFinished) {
          return;
        }

        for (var _iterator29 = files, _isArray29 = true, _i31 = 0, _iterator29 = _isArray29 ? _iterator29 : _iterator29[Symbol.iterator]();;) {
          var _ref28;

          if (_isArray29) {
            if (_i31 >= _iterator29.length) break;
            _ref28 = _iterator29[_i31++];
          } else {
            _i31 = _iterator29.next();
            if (_i31.done) break;
            _ref28 = _i31.value;
          }

          var _file5 = _ref28;
          this.emit("uploadprogress", _file5, progress, _file5.upload.bytesSent);
        }
      }
    }
  }, {
    key: "_finishedUploading",
    value: function _finishedUploading(files, xhr, e) {
      var response = void 0;

      if (files[0].status === Dropzone.CANCELED) {
        return;
      }

      if (xhr.readyState !== 4) {
        return;
      }

      if (xhr.responseType !== 'arraybuffer' && xhr.responseType !== 'blob') {
        response = xhr.responseText;

        if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) {
          try {
            response = JSON.parse(response);
          } catch (error) {
            e = error;
            response = "Invalid JSON response from server.";
          }
        }
      }

      this._updateFilesUploadProgress(files);

      if (!(200 <= xhr.status && xhr.status < 300)) {
        this._handleUploadError(files, xhr, response);
      } else {
        if (files[0].upload.chunked) {
          files[0].upload.finishedChunkUpload(this._getChunk(files[0], xhr));
        } else {
          this._finished(files, response, e);
        }
      }
    }
  }, {
    key: "_handleUploadError",
    value: function _handleUploadError(files, xhr, response) {
      if (files[0].status === Dropzone.CANCELED) {
        return;
      }

      if (files[0].upload.chunked && this.options.retryChunks) {
        var chunk = this._getChunk(files[0], xhr);

        if (chunk.retries++ < this.options.retryChunksLimit) {
          this._uploadData(files, [chunk.dataBlock]);

          return;
        } else {
          console.warn('Retried this chunk too often. Giving up.');
        }
      }

      for (var _iterator30 = files, _isArray30 = true, _i32 = 0, _iterator30 = _isArray30 ? _iterator30 : _iterator30[Symbol.iterator]();;) {
        var _ref29;

        if (_isArray30) {
          if (_i32 >= _iterator30.length) break;
          _ref29 = _iterator30[_i32++];
        } else {
          _i32 = _iterator30.next();
          if (_i32.done) break;
          _ref29 = _i32.value;
        }

        var file = _ref29;

        this._errorProcessing(files, response || this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr);
      }
    }
  }, {
    key: "submitRequest",
    value: function submitRequest(xhr, formData, files) {
      xhr.send(formData);
    } // Called internally when processing is finished.
    // Individual callbacks have to be called in the appropriate sections.

  }, {
    key: "_finished",
    value: function _finished(files, responseText, e) {
      for (var _iterator31 = files, _isArray31 = true, _i33 = 0, _iterator31 = _isArray31 ? _iterator31 : _iterator31[Symbol.iterator]();;) {
        var _ref30;

        if (_isArray31) {
          if (_i33 >= _iterator31.length) break;
          _ref30 = _iterator31[_i33++];
        } else {
          _i33 = _iterator31.next();
          if (_i33.done) break;
          _ref30 = _i33.value;
        }

        var file = _ref30;
        file.status = Dropzone.SUCCESS;
        this.emit("success", file, responseText, e);
        this.emit("complete", file);
      }

      if (this.options.uploadMultiple) {
        this.emit("successmultiple", files, responseText, e);
        this.emit("completemultiple", files);
      }

      if (this.options.autoProcessQueue) {
        return this.processQueue();
      }
    } // Called internally when processing is finished.
    // Individual callbacks have to be called in the appropriate sections.

  }, {
    key: "_errorProcessing",
    value: function _errorProcessing(files, message, xhr) {
      for (var _iterator32 = files, _isArray32 = true, _i34 = 0, _iterator32 = _isArray32 ? _iterator32 : _iterator32[Symbol.iterator]();;) {
        var _ref31;

        if (_isArray32) {
          if (_i34 >= _iterator32.length) break;
          _ref31 = _iterator32[_i34++];
        } else {
          _i34 = _iterator32.next();
          if (_i34.done) break;
          _ref31 = _i34.value;
        }

        var file = _ref31;
        file.status = Dropzone.ERROR;
        this.emit("error", file, message, xhr);
        this.emit("complete", file);
      }

      if (this.options.uploadMultiple) {
        this.emit("errormultiple", files, message, xhr);
        this.emit("completemultiple", files);
      }

      if (this.options.autoProcessQueue) {
        return this.processQueue();
      }
    }
  }], [{
    key: "uuidv4",
    value: function uuidv4() {
      return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
        var r = Math.random() * 16 | 0,
            v = c === 'x' ? r : r & 0x3 | 0x8;
        return v.toString(16);
      });
    }
  }]);

  return Dropzone;
}(Emitter);

Dropzone.initClass();
Dropzone.version = "5.5.0"; // This is a map of options for your different dropzones. Add configurations
// to this object for your different dropzone elemens.
//
// Example:
//
//     Dropzone.options.myDropzoneElementId = { maxFilesize: 1 };
//
// To disable autoDiscover for a specific element, you can set `false` as an option:
//
//     Dropzone.options.myDisabledElementId = false;
//
// And in html:
//
//     <form action="/upload" id="my-dropzone-element-id" class="dropzone"></form>

Dropzone.options = {}; // Returns the options for an element or undefined if none available.

Dropzone.optionsForElement = function (element) {
  // Get the `Dropzone.options.elementId` for this element if it exists
  if (element.getAttribute("id")) {
    return Dropzone.options[camelize(element.getAttribute("id"))];
  } else {
    return undefined;
  }
}; // Holds a list of all dropzone instances


Dropzone.instances = []; // Returns the dropzone for given element if any

Dropzone.forElement = function (element) {
  if (typeof element === "string") {
    element = document.querySelector(element);
  }

  if ((element != null ? element.dropzone : undefined) == null) {
    throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");
  }

  return element.dropzone;
}; // Set to false if you don't want Dropzone to automatically find and attach to .dropzone elements.


Dropzone.autoDiscover = true; // Looks for all .dropzone elements and creates a dropzone for them

Dropzone.discover = function () {
  var dropzones = void 0;

  if (document.querySelectorAll) {
    dropzones = document.querySelectorAll(".dropzone");
  } else {
    dropzones = []; // IE :(

    var checkElements = function checkElements(elements) {
      return function () {
        var result = [];

        for (var _iterator33 = elements, _isArray33 = true, _i35 = 0, _iterator33 = _isArray33 ? _iterator33 : _iterator33[Symbol.iterator]();;) {
          var _ref32;

          if (_isArray33) {
            if (_i35 >= _iterator33.length) break;
            _ref32 = _iterator33[_i35++];
          } else {
            _i35 = _iterator33.next();
            if (_i35.done) break;
            _ref32 = _i35.value;
          }

          var el = _ref32;

          if (/(^| )dropzone($| )/.test(el.className)) {
            result.push(dropzones.push(el));
          } else {
            result.push(undefined);
          }
        }

        return result;
      }();
    };

    checkElements(document.getElementsByTagName("div"));
    checkElements(document.getElementsByTagName("form"));
  }

  return function () {
    var result = [];

    for (var _iterator34 = dropzones, _isArray34 = true, _i36 = 0, _iterator34 = _isArray34 ? _iterator34 : _iterator34[Symbol.iterator]();;) {
      var _ref33;

      if (_isArray34) {
        if (_i36 >= _iterator34.length) break;
        _ref33 = _iterator34[_i36++];
      } else {
        _i36 = _iterator34.next();
        if (_i36.done) break;
        _ref33 = _i36.value;
      }

      var dropzone = _ref33; // Create a dropzone unless auto discover has been disabled for specific element

      if (Dropzone.optionsForElement(dropzone) !== false) {
        result.push(new Dropzone(dropzone));
      } else {
        result.push(undefined);
      }
    }

    return result;
  }();
}; // Since the whole Drag'n'Drop API is pretty new, some browsers implement it,
// but not correctly.
// So I created a blacklist of userAgents. Yes, yes. Browser sniffing, I know.
// But what to do when browsers *theoretically* support an API, but crash
// when using it.
//
// This is a list of regular expressions tested against navigator.userAgent
//
// ** It should only be used on browser that *do* support the API, but
// incorrectly **
//


Dropzone.blacklistedBrowsers = [// The mac os and windows phone version of opera 12 seems to have a problem with the File drag'n'drop API.
/opera.*(Macintosh|Windows Phone).*version\/12/i]; // Checks if the browser is supported

Dropzone.isBrowserSupported = function () {
  var capableBrowser = true;

  if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) {
    if (!("classList" in document.createElement("a"))) {
      capableBrowser = false;
    } else {
      // The browser supports the API, but may be blacklisted.
      for (var _iterator35 = Dropzone.blacklistedBrowsers, _isArray35 = true, _i37 = 0, _iterator35 = _isArray35 ? _iterator35 : _iterator35[Symbol.iterator]();;) {
        var _ref34;

        if (_isArray35) {
          if (_i37 >= _iterator35.length) break;
          _ref34 = _iterator35[_i37++];
        } else {
          _i37 = _iterator35.next();
          if (_i37.done) break;
          _ref34 = _i37.value;
        }

        var regex = _ref34;

        if (regex.test(navigator.userAgent)) {
          capableBrowser = false;
          continue;
        }
      }
    }
  } else {
    capableBrowser = false;
  }

  return capableBrowser;
};

Dropzone.dataURItoBlob = function (dataURI) {
  // convert base64 to raw binary data held in a string
  // doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this
  var byteString = atob(dataURI.split(',')[1]); // separate out the mime component

  var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0]; // write the bytes of the string to an ArrayBuffer

  var ab = new ArrayBuffer(byteString.length);
  var ia = new Uint8Array(ab);

  for (var i = 0, end = byteString.length, asc = 0 <= end; asc ? i <= end : i >= end; asc ? i++ : i--) {
    ia[i] = byteString.charCodeAt(i);
  } // write the ArrayBuffer to a blob


  return new Blob([ab], {
    type: mimeString
  });
}; // Returns an array without the rejected item


var without = function without(list, rejectedItem) {
  return list.filter(function (item) {
    return item !== rejectedItem;
  }).map(function (item) {
    return item;
  });
}; // abc-def_ghi -> abcDefGhi


var camelize = function camelize(str) {
  return str.replace(/[\-_](\w)/g, function (match) {
    return match.charAt(1).toUpperCase();
  });
}; // Creates an element from string


Dropzone.createElement = function (string) {
  var div = document.createElement("div");
  div.innerHTML = string;
  return div.childNodes[0];
}; // Tests if given element is inside (or simply is) the container


Dropzone.elementInside = function (element, container) {
  if (element === container) {
    return true;
  } // Coffeescript doesn't support do/while loops


  while (element = element.parentNode) {
    if (element === container) {
      return true;
    }
  }

  return false;
};

Dropzone.getElement = function (el, name) {
  var element = void 0;

  if (typeof el === "string") {
    element = document.querySelector(el);
  } else if (el.nodeType != null) {
    element = el;
  }

  if (element == null) {
    throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector or a plain HTML element.");
  }

  return element;
};

Dropzone.getElements = function (els, name) {
  var el = void 0,
      elements = void 0;

  if (els instanceof Array) {
    elements = [];

    try {
      for (var _iterator36 = els, _isArray36 = true, _i38 = 0, _iterator36 = _isArray36 ? _iterator36 : _iterator36[Symbol.iterator]();;) {
        if (_isArray36) {
          if (_i38 >= _iterator36.length) break;
          el = _iterator36[_i38++];
        } else {
          _i38 = _iterator36.next();
          if (_i38.done) break;
          el = _i38.value;
        }

        elements.push(this.getElement(el, name));
      }
    } catch (e) {
      elements = null;
    }
  } else if (typeof els === "string") {
    elements = [];

    for (var _iterator37 = document.querySelectorAll(els), _isArray37 = true, _i39 = 0, _iterator37 = _isArray37 ? _iterator37 : _iterator37[Symbol.iterator]();;) {
      if (_isArray37) {
        if (_i39 >= _iterator37.length) break;
        el = _iterator37[_i39++];
      } else {
        _i39 = _iterator37.next();
        if (_i39.done) break;
        el = _i39.value;
      }

      elements.push(el);
    }
  } else if (els.nodeType != null) {
    elements = [els];
  }

  if (elements == null || !elements.length) {
    throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");
  }

  return elements;
}; // Asks the user the question and calls accepted or rejected accordingly
//
// The default implementation just uses `window.confirm` and then calls the
// appropriate callback.


Dropzone.confirm = function (question, accepted, rejected) {
  if (window.confirm(question)) {
    return accepted();
  } else if (rejected != null) {
    return rejected();
  }
}; // Validates the mime type like this:
//
// https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept


Dropzone.isValidFile = function (file, acceptedFiles) {
  if (!acceptedFiles) {
    return true;
  } // If there are no accepted mime types, it's OK


  acceptedFiles = acceptedFiles.split(",");
  var mimeType = file.type;
  var baseMimeType = mimeType.replace(/\/.*$/, "");

  for (var _iterator38 = acceptedFiles, _isArray38 = true, _i40 = 0, _iterator38 = _isArray38 ? _iterator38 : _iterator38[Symbol.iterator]();;) {
    var _ref35;

    if (_isArray38) {
      if (_i40 >= _iterator38.length) break;
      _ref35 = _iterator38[_i40++];
    } else {
      _i40 = _iterator38.next();
      if (_i40.done) break;
      _ref35 = _i40.value;
    }

    var validType = _ref35;
    validType = validType.trim();

    if (validType.charAt(0) === ".") {
      if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) {
        return true;
      }
    } else if (/\/\*$/.test(validType)) {
      // This is something like a image/* mime type
      if (baseMimeType === validType.replace(/\/.*$/, "")) {
        return true;
      }
    } else {
      if (mimeType === validType) {
        return true;
      }
    }
  }

  return false;
}; // Augment jQuery


if (typeof jQuery !== 'undefined' && jQuery !== null) {
  jQuery.fn.dropzone = function (options) {
    return this.each(function () {
      return new Dropzone(this, options);
    });
  };
}

if ( true && module !== null) {
  module.exports = Dropzone;
} else {
  window.Dropzone = Dropzone;
} // Dropzone file status codes


Dropzone.ADDED = "added";
Dropzone.QUEUED = "queued"; // For backwards compatibility. Now, if a file is accepted, it's either queued
// or uploading.

Dropzone.ACCEPTED = Dropzone.QUEUED;
Dropzone.UPLOADING = "uploading";
Dropzone.PROCESSING = Dropzone.UPLOADING; // alias

Dropzone.CANCELED = "canceled";
Dropzone.ERROR = "error";
Dropzone.SUCCESS = "success";
/*

 Bugfix for iOS 6 and 7
 Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios
 based on the work of https://github.com/stomita/ios-imagefile-megapixel

 */
// Detecting vertical squash in loaded image.
// Fixes a bug which squash image vertically while drawing into canvas for some images.
// This is a bug in iOS6 devices. This function from https://github.com/stomita/ios-imagefile-megapixel

var detectVerticalSquash = function detectVerticalSquash(img) {
  var iw = img.naturalWidth;
  var ih = img.naturalHeight;
  var canvas = document.createElement("canvas");
  canvas.width = 1;
  canvas.height = ih;
  var ctx = canvas.getContext("2d");
  ctx.drawImage(img, 0, 0);

  var _ctx$getImageData = ctx.getImageData(1, 0, 1, ih),
      data = _ctx$getImageData.data; // search image edge pixel position in case it is squashed vertically.


  var sy = 0;
  var ey = ih;
  var py = ih;

  while (py > sy) {
    var alpha = data[(py - 1) * 4 + 3];

    if (alpha === 0) {
      ey = py;
    } else {
      sy = py;
    }

    py = ey + sy >> 1;
  }

  var ratio = py / ih;

  if (ratio === 0) {
    return 1;
  } else {
    return ratio;
  }
}; // A replacement for context.drawImage
// (args are for source and destination).


var drawImageIOSFix = function drawImageIOSFix(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) {
  var vertSquashRatio = detectVerticalSquash(img);
  return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio);
}; // Based on MinifyJpeg
// Source: http://www.perry.cz/files/ExifRestorer.js
// http://elicon.blog57.fc2.com/blog-entry-206.html


var ExifRestore = function () {
  function ExifRestore() {
    _classCallCheck(this, ExifRestore);
  }

  _createClass(ExifRestore, null, [{
    key: "initClass",
    value: function initClass() {
      this.KEY_STR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
    }
  }, {
    key: "encode64",
    value: function encode64(input) {
      var output = '';
      var chr1 = undefined;
      var chr2 = undefined;
      var chr3 = '';
      var enc1 = undefined;
      var enc2 = undefined;
      var enc3 = undefined;
      var enc4 = '';
      var i = 0;

      while (true) {
        chr1 = input[i++];
        chr2 = input[i++];
        chr3 = input[i++];
        enc1 = chr1 >> 2;
        enc2 = (chr1 & 3) << 4 | chr2 >> 4;
        enc3 = (chr2 & 15) << 2 | chr3 >> 6;
        enc4 = chr3 & 63;

        if (isNaN(chr2)) {
          enc3 = enc4 = 64;
        } else if (isNaN(chr3)) {
          enc4 = 64;
        }

        output = output + this.KEY_STR.charAt(enc1) + this.KEY_STR.charAt(enc2) + this.KEY_STR.charAt(enc3) + this.KEY_STR.charAt(enc4);
        chr1 = chr2 = chr3 = '';
        enc1 = enc2 = enc3 = enc4 = '';

        if (!(i < input.length)) {
          break;
        }
      }

      return output;
    }
  }, {
    key: "restore",
    value: function restore(origFileBase64, resizedFileBase64) {
      if (!origFileBase64.match('data:image/jpeg;base64,')) {
        return resizedFileBase64;
      }

      var rawImage = this.decode64(origFileBase64.replace('data:image/jpeg;base64,', ''));
      var segments = this.slice2Segments(rawImage);
      var image = this.exifManipulation(resizedFileBase64, segments);
      return "data:image/jpeg;base64," + this.encode64(image);
    }
  }, {
    key: "exifManipulation",
    value: function exifManipulation(resizedFileBase64, segments) {
      var exifArray = this.getExifArray(segments);
      var newImageArray = this.insertExif(resizedFileBase64, exifArray);
      var aBuffer = new Uint8Array(newImageArray);
      return aBuffer;
    }
  }, {
    key: "getExifArray",
    value: function getExifArray(segments) {
      var seg = undefined;
      var x = 0;

      while (x < segments.length) {
        seg = segments[x];

        if (seg[0] === 255 & seg[1] === 225) {
          return seg;
        }

        x++;
      }

      return [];
    }
  }, {
    key: "insertExif",
    value: function insertExif(resizedFileBase64, exifArray) {
      var imageData = resizedFileBase64.replace('data:image/jpeg;base64,', '');
      var buf = this.decode64(imageData);
      var separatePoint = buf.indexOf(255, 3);
      var mae = buf.slice(0, separatePoint);
      var ato = buf.slice(separatePoint);
      var array = mae;
      array = array.concat(exifArray);
      array = array.concat(ato);
      return array;
    }
  }, {
    key: "slice2Segments",
    value: function slice2Segments(rawImageArray) {
      var head = 0;
      var segments = [];

      while (true) {
        var length;

        if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 218) {
          break;
        }

        if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 216) {
          head += 2;
        } else {
          length = rawImageArray[head + 2] * 256 + rawImageArray[head + 3];
          var endPoint = head + length + 2;
          var seg = rawImageArray.slice(head, endPoint);
          segments.push(seg);
          head = endPoint;
        }

        if (head > rawImageArray.length) {
          break;
        }
      }

      return segments;
    }
  }, {
    key: "decode64",
    value: function decode64(input) {
      var output = '';
      var chr1 = undefined;
      var chr2 = undefined;
      var chr3 = '';
      var enc1 = undefined;
      var enc2 = undefined;
      var enc3 = undefined;
      var enc4 = '';
      var i = 0;
      var buf = []; // remove all characters that are not A-Z, a-z, 0-9, +, /, or =

      var base64test = /[^A-Za-z0-9\+\/\=]/g;

      if (base64test.exec(input)) {
        console.warn('There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, \'+\', \'/\',and \'=\'\nExpect errors in decoding.');
      }

      input = input.replace(/[^A-Za-z0-9\+\/\=]/g, '');

      while (true) {
        enc1 = this.KEY_STR.indexOf(input.charAt(i++));
        enc2 = this.KEY_STR.indexOf(input.charAt(i++));
        enc3 = this.KEY_STR.indexOf(input.charAt(i++));
        enc4 = this.KEY_STR.indexOf(input.charAt(i++));
        chr1 = enc1 << 2 | enc2 >> 4;
        chr2 = (enc2 & 15) << 4 | enc3 >> 2;
        chr3 = (enc3 & 3) << 6 | enc4;
        buf.push(chr1);

        if (enc3 !== 64) {
          buf.push(chr2);
        }

        if (enc4 !== 64) {
          buf.push(chr3);
        }

        chr1 = chr2 = chr3 = '';
        enc1 = enc2 = enc3 = enc4 = '';

        if (!(i < input.length)) {
          break;
        }
      }

      return buf;
    }
  }]);

  return ExifRestore;
}();

ExifRestore.initClass();
/*
 * contentloaded.js
 *
 * Author: Diego Perini (diego.perini at gmail.com)
 * Summary: cross-browser wrapper for DOMContentLoaded
 * Updated: 20101020
 * License: MIT
 * Version: 1.2
 *
 * URL:
 * http://javascript.nwbox.com/ContentLoaded/
 * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE
 */
// @win window reference
// @fn function reference

var contentLoaded = function contentLoaded(win, fn) {
  var done = false;
  var top = true;
  var doc = win.document;
  var root = doc.documentElement;
  var add = doc.addEventListener ? "addEventListener" : "attachEvent";
  var rem = doc.addEventListener ? "removeEventListener" : "detachEvent";
  var pre = doc.addEventListener ? "" : "on";

  var init = function init(e) {
    if (e.type === "readystatechange" && doc.readyState !== "complete") {
      return;
    }

    (e.type === "load" ? win : doc)[rem](pre + e.type, init, false);

    if (!done && (done = true)) {
      return fn.call(win, e.type || e);
    }
  };

  var poll = function poll() {
    try {
      root.doScroll("left");
    } catch (e) {
      setTimeout(poll, 50);
      return;
    }

    return init("poll");
  };

  if (doc.readyState !== "complete") {
    if (doc.createEventObject && root.doScroll) {
      try {
        top = !win.frameElement;
      } catch (error) {}

      if (top) {
        poll();
      }
    }

    doc[add](pre + "DOMContentLoaded", init, false);
    doc[add](pre + "readystatechange", init, false);
    return win[add](pre + "load", init, false);
  }
}; // As a single function to be able to write tests.


Dropzone._autoDiscoverFunction = function () {
  if (Dropzone.autoDiscover) {
    return Dropzone.discover();
  }
};

contentLoaded(window, Dropzone._autoDiscoverFunction);

function __guard__(value, transform) {
  return typeof value !== 'undefined' && value !== null ? transform(value) : undefined;
}

function __guardMethod__(obj, methodName, transform) {
  if (typeof obj !== 'undefined' && obj !== null && typeof obj[methodName] === 'function') {
    return transform(obj, methodName);
  } else {
    return undefined;
  }
}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))

/***/ }),

/***/ "./resources/assets/js/lib/hammer.js":
/*!*******************************************!*\
  !*** ./resources/assets/js/lib/hammer.js ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }

/*! Hammer.JS - v2.0.8 - 2016-04-23
 * http://hammerjs.github.io/
 *
 * Copyright (c) 2016 Jorik Tangelder;
 * Licensed under the MIT license */
!function (a, b, c, d) {
  "use strict";

  function e(a, b, c) {
    return setTimeout(j(a, c), b);
  }

  function f(a, b, c) {
    return Array.isArray(a) ? (g(a, c[b], c), !0) : !1;
  }

  function g(a, b, c) {
    var e;
    if (a) if (a.forEach) a.forEach(b, c);else if (a.length !== d) for (e = 0; e < a.length;) {
      b.call(c, a[e], e, a), e++;
    } else for (e in a) {
      a.hasOwnProperty(e) && b.call(c, a[e], e, a);
    }
  }

  function h(b, c, d) {
    var e = "DEPRECATED METHOD: " + c + "\n" + d + " AT \n";
    return function () {
      var c = new Error("get-stack-trace"),
          d = c && c.stack ? c.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace",
          f = a.console && (a.console.warn || a.console.log);
      return f && f.call(a.console, e, d), b.apply(this, arguments);
    };
  }

  function i(a, b, c) {
    var d,
        e = b.prototype;
    d = a.prototype = Object.create(e), d.constructor = a, d._super = e, c && la(d, c);
  }

  function j(a, b) {
    return function () {
      return a.apply(b, arguments);
    };
  }

  function k(a, b) {
    return _typeof(a) == oa ? a.apply(b ? b[0] || d : d, b) : a;
  }

  function l(a, b) {
    return a === d ? b : a;
  }

  function m(a, b, c) {
    g(q(b), function (b) {
      a.addEventListener(b, c, !1);
    });
  }

  function n(a, b, c) {
    g(q(b), function (b) {
      a.removeEventListener(b, c, !1);
    });
  }

  function o(a, b) {
    for (; a;) {
      if (a == b) return !0;
      a = a.parentNode;
    }

    return !1;
  }

  function p(a, b) {
    return a.indexOf(b) > -1;
  }

  function q(a) {
    return a.trim().split(/\s+/g);
  }

  function r(a, b, c) {
    if (a.indexOf && !c) return a.indexOf(b);

    for (var d = 0; d < a.length;) {
      if (c && a[d][c] == b || !c && a[d] === b) return d;
      d++;
    }

    return -1;
  }

  function s(a) {
    return Array.prototype.slice.call(a, 0);
  }

  function t(a, b, c) {
    for (var d = [], e = [], f = 0; f < a.length;) {
      var g = b ? a[f][b] : a[f];
      r(e, g) < 0 && d.push(a[f]), e[f] = g, f++;
    }

    return c && (d = b ? d.sort(function (a, c) {
      return a[b] > c[b];
    }) : d.sort()), d;
  }

  function u(a, b) {
    for (var c, e, f = b[0].toUpperCase() + b.slice(1), g = 0; g < ma.length;) {
      if (c = ma[g], e = c ? c + f : b, e in a) return e;
      g++;
    }

    return d;
  }

  function v() {
    return ua++;
  }

  function w(b) {
    var c = b.ownerDocument || b;
    return c.defaultView || c.parentWindow || a;
  }

  function x(a, b) {
    var c = this;
    this.manager = a, this.callback = b, this.element = a.element, this.target = a.options.inputTarget, this.domHandler = function (b) {
      k(a.options.enable, [a]) && c.handler(b);
    }, this.init();
  }

  function y(a) {
    var b,
        c = a.options.inputClass;
    return new (b = c ? c : xa ? M : ya ? P : wa ? R : L)(a, z);
  }

  function z(a, b, c) {
    var d = c.pointers.length,
        e = c.changedPointers.length,
        f = b & Ea && d - e === 0,
        g = b & (Ga | Ha) && d - e === 0;
    c.isFirst = !!f, c.isFinal = !!g, f && (a.session = {}), c.eventType = b, A(a, c), a.emit("hammer.input", c), a.recognize(c), a.session.prevInput = c;
  }

  function A(a, b) {
    var c = a.session,
        d = b.pointers,
        e = d.length;
    c.firstInput || (c.firstInput = D(b)), e > 1 && !c.firstMultiple ? c.firstMultiple = D(b) : 1 === e && (c.firstMultiple = !1);
    var f = c.firstInput,
        g = c.firstMultiple,
        h = g ? g.center : f.center,
        i = b.center = E(d);
    b.timeStamp = ra(), b.deltaTime = b.timeStamp - f.timeStamp, b.angle = I(h, i), b.distance = H(h, i), B(c, b), b.offsetDirection = G(b.deltaX, b.deltaY);
    var j = F(b.deltaTime, b.deltaX, b.deltaY);
    b.overallVelocityX = j.x, b.overallVelocityY = j.y, b.overallVelocity = qa(j.x) > qa(j.y) ? j.x : j.y, b.scale = g ? K(g.pointers, d) : 1, b.rotation = g ? J(g.pointers, d) : 0, b.maxPointers = c.prevInput ? b.pointers.length > c.prevInput.maxPointers ? b.pointers.length : c.prevInput.maxPointers : b.pointers.length, C(c, b);
    var k = a.element;
    o(b.srcEvent.target, k) && (k = b.srcEvent.target), b.target = k;
  }

  function B(a, b) {
    var c = b.center,
        d = a.offsetDelta || {},
        e = a.prevDelta || {},
        f = a.prevInput || {};
    b.eventType !== Ea && f.eventType !== Ga || (e = a.prevDelta = {
      x: f.deltaX || 0,
      y: f.deltaY || 0
    }, d = a.offsetDelta = {
      x: c.x,
      y: c.y
    }), b.deltaX = e.x + (c.x - d.x), b.deltaY = e.y + (c.y - d.y);
  }

  function C(a, b) {
    var c,
        e,
        f,
        g,
        h = a.lastInterval || b,
        i = b.timeStamp - h.timeStamp;

    if (b.eventType != Ha && (i > Da || h.velocity === d)) {
      var j = b.deltaX - h.deltaX,
          k = b.deltaY - h.deltaY,
          l = F(i, j, k);
      e = l.x, f = l.y, c = qa(l.x) > qa(l.y) ? l.x : l.y, g = G(j, k), a.lastInterval = b;
    } else c = h.velocity, e = h.velocityX, f = h.velocityY, g = h.direction;

    b.velocity = c, b.velocityX = e, b.velocityY = f, b.direction = g;
  }

  function D(a) {
    for (var b = [], c = 0; c < a.pointers.length;) {
      b[c] = {
        clientX: pa(a.pointers[c].clientX),
        clientY: pa(a.pointers[c].clientY)
      }, c++;
    }

    return {
      timeStamp: ra(),
      pointers: b,
      center: E(b),
      deltaX: a.deltaX,
      deltaY: a.deltaY
    };
  }

  function E(a) {
    var b = a.length;
    if (1 === b) return {
      x: pa(a[0].clientX),
      y: pa(a[0].clientY)
    };

    for (var c = 0, d = 0, e = 0; b > e;) {
      c += a[e].clientX, d += a[e].clientY, e++;
    }

    return {
      x: pa(c / b),
      y: pa(d / b)
    };
  }

  function F(a, b, c) {
    return {
      x: b / a || 0,
      y: c / a || 0
    };
  }

  function G(a, b) {
    return a === b ? Ia : qa(a) >= qa(b) ? 0 > a ? Ja : Ka : 0 > b ? La : Ma;
  }

  function H(a, b, c) {
    c || (c = Qa);
    var d = b[c[0]] - a[c[0]],
        e = b[c[1]] - a[c[1]];
    return Math.sqrt(d * d + e * e);
  }

  function I(a, b, c) {
    c || (c = Qa);
    var d = b[c[0]] - a[c[0]],
        e = b[c[1]] - a[c[1]];
    return 180 * Math.atan2(e, d) / Math.PI;
  }

  function J(a, b) {
    return I(b[1], b[0], Ra) + I(a[1], a[0], Ra);
  }

  function K(a, b) {
    return H(b[0], b[1], Ra) / H(a[0], a[1], Ra);
  }

  function L() {
    this.evEl = Ta, this.evWin = Ua, this.pressed = !1, x.apply(this, arguments);
  }

  function M() {
    this.evEl = Xa, this.evWin = Ya, x.apply(this, arguments), this.store = this.manager.session.pointerEvents = [];
  }

  function N() {
    this.evTarget = $a, this.evWin = _a, this.started = !1, x.apply(this, arguments);
  }

  function O(a, b) {
    var c = s(a.touches),
        d = s(a.changedTouches);
    return b & (Ga | Ha) && (c = t(c.concat(d), "identifier", !0)), [c, d];
  }

  function P() {
    this.evTarget = bb, this.targetIds = {}, x.apply(this, arguments);
  }

  function Q(a, b) {
    var c = s(a.touches),
        d = this.targetIds;
    if (b & (Ea | Fa) && 1 === c.length) return d[c[0].identifier] = !0, [c, c];
    var e,
        f,
        g = s(a.changedTouches),
        h = [],
        i = this.target;
    if (f = c.filter(function (a) {
      return o(a.target, i);
    }), b === Ea) for (e = 0; e < f.length;) {
      d[f[e].identifier] = !0, e++;
    }

    for (e = 0; e < g.length;) {
      d[g[e].identifier] && h.push(g[e]), b & (Ga | Ha) && delete d[g[e].identifier], e++;
    }

    return h.length ? [t(f.concat(h), "identifier", !0), h] : void 0;
  }

  function R() {
    x.apply(this, arguments);
    var a = j(this.handler, this);
    this.touch = new P(this.manager, a), this.mouse = new L(this.manager, a), this.primaryTouch = null, this.lastTouches = [];
  }

  function S(a, b) {
    a & Ea ? (this.primaryTouch = b.changedPointers[0].identifier, T.call(this, b)) : a & (Ga | Ha) && T.call(this, b);
  }

  function T(a) {
    var b = a.changedPointers[0];

    if (b.identifier === this.primaryTouch) {
      var c = {
        x: b.clientX,
        y: b.clientY
      };
      this.lastTouches.push(c);

      var d = this.lastTouches,
          e = function e() {
        var a = d.indexOf(c);
        a > -1 && d.splice(a, 1);
      };

      setTimeout(e, cb);
    }
  }

  function U(a) {
    for (var b = a.srcEvent.clientX, c = a.srcEvent.clientY, d = 0; d < this.lastTouches.length; d++) {
      var e = this.lastTouches[d],
          f = Math.abs(b - e.x),
          g = Math.abs(c - e.y);
      if (db >= f && db >= g) return !0;
    }

    return !1;
  }

  function V(a, b) {
    this.manager = a, this.set(b);
  }

  function W(a) {
    if (p(a, jb)) return jb;
    var b = p(a, kb),
        c = p(a, lb);
    return b && c ? jb : b || c ? b ? kb : lb : p(a, ib) ? ib : hb;
  }

  function X() {
    if (!fb) return !1;
    var b = {},
        c = a.CSS && a.CSS.supports;
    return ["auto", "manipulation", "pan-y", "pan-x", "pan-x pan-y", "none"].forEach(function (d) {
      b[d] = c ? a.CSS.supports("touch-action", d) : !0;
    }), b;
  }

  function Y(a) {
    this.options = la({}, this.defaults, a || {}), this.id = v(), this.manager = null, this.options.enable = l(this.options.enable, !0), this.state = nb, this.simultaneous = {}, this.requireFail = [];
  }

  function Z(a) {
    return a & sb ? "cancel" : a & qb ? "end" : a & pb ? "move" : a & ob ? "start" : "";
  }

  function $(a) {
    return a == Ma ? "down" : a == La ? "up" : a == Ja ? "left" : a == Ka ? "right" : "";
  }

  function _(a, b) {
    var c = b.manager;
    return c ? c.get(a) : a;
  }

  function aa() {
    Y.apply(this, arguments);
  }

  function ba() {
    aa.apply(this, arguments), this.pX = null, this.pY = null;
  }

  function ca() {
    aa.apply(this, arguments);
  }

  function da() {
    Y.apply(this, arguments), this._timer = null, this._input = null;
  }

  function ea() {
    aa.apply(this, arguments);
  }

  function fa() {
    aa.apply(this, arguments);
  }

  function ga() {
    Y.apply(this, arguments), this.pTime = !1, this.pCenter = !1, this._timer = null, this._input = null, this.count = 0;
  }

  function ha(a, b) {
    return b = b || {}, b.recognizers = l(b.recognizers, ha.defaults.preset), new ia(a, b);
  }

  function ia(a, b) {
    this.options = la({}, ha.defaults, b || {}), this.options.inputTarget = this.options.inputTarget || a, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = a, this.input = y(this), this.touchAction = new V(this, this.options.touchAction), ja(this, !0), g(this.options.recognizers, function (a) {
      var b = this.add(new a[0](a[1]));
      a[2] && b.recognizeWith(a[2]), a[3] && b.requireFailure(a[3]);
    }, this);
  }

  function ja(a, b) {
    var c = a.element;

    if (c.style) {
      var d;
      g(a.options.cssProps, function (e, f) {
        d = u(c.style, f), b ? (a.oldCssProps[d] = c.style[d], c.style[d] = e) : c.style[d] = a.oldCssProps[d] || "";
      }), b || (a.oldCssProps = {});
    }
  }

  function ka(a, c) {
    var d = b.createEvent("Event");
    d.initEvent(a, !0, !0), d.gesture = c, c.target.dispatchEvent(d);
  }

  var la,
      ma = ["", "webkit", "Moz", "MS", "ms", "o"],
      na = b.createElement("div"),
      oa = "function",
      pa = Math.round,
      qa = Math.abs,
      ra = Date.now;
  la = "function" != typeof Object.assign ? function (a) {
    if (a === d || null === a) throw new TypeError("Cannot convert undefined or null to object");

    for (var b = Object(a), c = 1; c < arguments.length; c++) {
      var e = arguments[c];
      if (e !== d && null !== e) for (var f in e) {
        e.hasOwnProperty(f) && (b[f] = e[f]);
      }
    }

    return b;
  } : Object.assign;
  var sa = h(function (a, b, c) {
    for (var e = Object.keys(b), f = 0; f < e.length;) {
      (!c || c && a[e[f]] === d) && (a[e[f]] = b[e[f]]), f++;
    }

    return a;
  }, "extend", "Use `assign`."),
      ta = h(function (a, b) {
    return sa(a, b, !0);
  }, "merge", "Use `assign`."),
      ua = 1,
      va = /mobile|tablet|ip(ad|hone|od)|android/i,
      wa = ("ontouchstart" in a),
      xa = u(a, "PointerEvent") !== d,
      ya = wa && va.test(navigator.userAgent),
      za = "touch",
      Aa = "pen",
      Ba = "mouse",
      Ca = "kinect",
      Da = 25,
      Ea = 1,
      Fa = 2,
      Ga = 4,
      Ha = 8,
      Ia = 1,
      Ja = 2,
      Ka = 4,
      La = 8,
      Ma = 16,
      Na = Ja | Ka,
      Oa = La | Ma,
      Pa = Na | Oa,
      Qa = ["x", "y"],
      Ra = ["clientX", "clientY"];
  x.prototype = {
    handler: function handler() {},
    init: function init() {
      this.evEl && m(this.element, this.evEl, this.domHandler), this.evTarget && m(this.target, this.evTarget, this.domHandler), this.evWin && m(w(this.element), this.evWin, this.domHandler);
    },
    destroy: function destroy() {
      this.evEl && n(this.element, this.evEl, this.domHandler), this.evTarget && n(this.target, this.evTarget, this.domHandler), this.evWin && n(w(this.element), this.evWin, this.domHandler);
    }
  };
  var Sa = {
    mousedown: Ea,
    mousemove: Fa,
    mouseup: Ga
  },
      Ta = "mousedown",
      Ua = "mousemove mouseup";
  i(L, x, {
    handler: function handler(a) {
      var b = Sa[a.type];
      b & Ea && 0 === a.button && (this.pressed = !0), b & Fa && 1 !== a.which && (b = Ga), this.pressed && (b & Ga && (this.pressed = !1), this.callback(this.manager, b, {
        pointers: [a],
        changedPointers: [a],
        pointerType: Ba,
        srcEvent: a
      }));
    }
  });
  var Va = {
    pointerdown: Ea,
    pointermove: Fa,
    pointerup: Ga,
    pointercancel: Ha,
    pointerout: Ha
  },
      Wa = {
    2: za,
    3: Aa,
    4: Ba,
    5: Ca
  },
      Xa = "pointerdown",
      Ya = "pointermove pointerup pointercancel";
  a.MSPointerEvent && !a.PointerEvent && (Xa = "MSPointerDown", Ya = "MSPointerMove MSPointerUp MSPointerCancel"), i(M, x, {
    handler: function handler(a) {
      var b = this.store,
          c = !1,
          d = a.type.toLowerCase().replace("ms", ""),
          e = Va[d],
          f = Wa[a.pointerType] || a.pointerType,
          g = f == za,
          h = r(b, a.pointerId, "pointerId");
      e & Ea && (0 === a.button || g) ? 0 > h && (b.push(a), h = b.length - 1) : e & (Ga | Ha) && (c = !0), 0 > h || (b[h] = a, this.callback(this.manager, e, {
        pointers: b,
        changedPointers: [a],
        pointerType: f,
        srcEvent: a
      }), c && b.splice(h, 1));
    }
  });
  var Za = {
    touchstart: Ea,
    touchmove: Fa,
    touchend: Ga,
    touchcancel: Ha
  },
      $a = "touchstart",
      _a = "touchstart touchmove touchend touchcancel";
  i(N, x, {
    handler: function handler(a) {
      var b = Za[a.type];

      if (b === Ea && (this.started = !0), this.started) {
        var c = O.call(this, a, b);
        b & (Ga | Ha) && c[0].length - c[1].length === 0 && (this.started = !1), this.callback(this.manager, b, {
          pointers: c[0],
          changedPointers: c[1],
          pointerType: za,
          srcEvent: a
        });
      }
    }
  });
  var ab = {
    touchstart: Ea,
    touchmove: Fa,
    touchend: Ga,
    touchcancel: Ha
  },
      bb = "touchstart touchmove touchend touchcancel";
  i(P, x, {
    handler: function handler(a) {
      var b = ab[a.type],
          c = Q.call(this, a, b);
      c && this.callback(this.manager, b, {
        pointers: c[0],
        changedPointers: c[1],
        pointerType: za,
        srcEvent: a
      });
    }
  });
  var cb = 2500,
      db = 25;
  i(R, x, {
    handler: function handler(a, b, c) {
      var d = c.pointerType == za,
          e = c.pointerType == Ba;

      if (!(e && c.sourceCapabilities && c.sourceCapabilities.firesTouchEvents)) {
        if (d) S.call(this, b, c);else if (e && U.call(this, c)) return;
        this.callback(a, b, c);
      }
    },
    destroy: function destroy() {
      this.touch.destroy(), this.mouse.destroy();
    }
  });
  var eb = u(na.style, "touchAction"),
      fb = eb !== d,
      gb = "compute",
      hb = "auto",
      ib = "manipulation",
      jb = "none",
      kb = "pan-x",
      lb = "pan-y",
      mb = X();
  V.prototype = {
    set: function set(a) {
      a == gb && (a = this.compute()), fb && this.manager.element.style && mb[a] && (this.manager.element.style[eb] = a), this.actions = a.toLowerCase().trim();
    },
    update: function update() {
      this.set(this.manager.options.touchAction);
    },
    compute: function compute() {
      var a = [];
      return g(this.manager.recognizers, function (b) {
        k(b.options.enable, [b]) && (a = a.concat(b.getTouchAction()));
      }), W(a.join(" "));
    },
    preventDefaults: function preventDefaults(a) {
      var b = a.srcEvent,
          c = a.offsetDirection;
      if (this.manager.session.prevented) return void b.preventDefault();
      var d = this.actions,
          e = p(d, jb) && !mb[jb],
          f = p(d, lb) && !mb[lb],
          g = p(d, kb) && !mb[kb];

      if (e) {
        var h = 1 === a.pointers.length,
            i = a.distance < 2,
            j = a.deltaTime < 250;
        if (h && i && j) return;
      }

      return g && f ? void 0 : e || f && c & Na || g && c & Oa ? this.preventSrc(b) : void 0;
    },
    preventSrc: function preventSrc(a) {
      this.manager.session.prevented = !0, a.preventDefault();
    }
  };
  var nb = 1,
      ob = 2,
      pb = 4,
      qb = 8,
      rb = qb,
      sb = 16,
      tb = 32;
  Y.prototype = {
    defaults: {},
    set: function set(a) {
      return la(this.options, a), this.manager && this.manager.touchAction.update(), this;
    },
    recognizeWith: function recognizeWith(a) {
      if (f(a, "recognizeWith", this)) return this;
      var b = this.simultaneous;
      return a = _(a, this), b[a.id] || (b[a.id] = a, a.recognizeWith(this)), this;
    },
    dropRecognizeWith: function dropRecognizeWith(a) {
      return f(a, "dropRecognizeWith", this) ? this : (a = _(a, this), delete this.simultaneous[a.id], this);
    },
    requireFailure: function requireFailure(a) {
      if (f(a, "requireFailure", this)) return this;
      var b = this.requireFail;
      return a = _(a, this), -1 === r(b, a) && (b.push(a), a.requireFailure(this)), this;
    },
    dropRequireFailure: function dropRequireFailure(a) {
      if (f(a, "dropRequireFailure", this)) return this;
      a = _(a, this);
      var b = r(this.requireFail, a);
      return b > -1 && this.requireFail.splice(b, 1), this;
    },
    hasRequireFailures: function hasRequireFailures() {
      return this.requireFail.length > 0;
    },
    canRecognizeWith: function canRecognizeWith(a) {
      return !!this.simultaneous[a.id];
    },
    emit: function emit(a) {
      function b(b) {
        c.manager.emit(b, a);
      }

      var c = this,
          d = this.state;
      qb > d && b(c.options.event + Z(d)), b(c.options.event), a.additionalEvent && b(a.additionalEvent), d >= qb && b(c.options.event + Z(d));
    },
    tryEmit: function tryEmit(a) {
      return this.canEmit() ? this.emit(a) : void (this.state = tb);
    },
    canEmit: function canEmit() {
      for (var a = 0; a < this.requireFail.length;) {
        if (!(this.requireFail[a].state & (tb | nb))) return !1;
        a++;
      }

      return !0;
    },
    recognize: function recognize(a) {
      var b = la({}, a);
      return k(this.options.enable, [this, b]) ? (this.state & (rb | sb | tb) && (this.state = nb), this.state = this.process(b), void (this.state & (ob | pb | qb | sb) && this.tryEmit(b))) : (this.reset(), void (this.state = tb));
    },
    process: function process(a) {},
    getTouchAction: function getTouchAction() {},
    reset: function reset() {}
  }, i(aa, Y, {
    defaults: {
      pointers: 1
    },
    attrTest: function attrTest(a) {
      var b = this.options.pointers;
      return 0 === b || a.pointers.length === b;
    },
    process: function process(a) {
      var b = this.state,
          c = a.eventType,
          d = b & (ob | pb),
          e = this.attrTest(a);
      return d && (c & Ha || !e) ? b | sb : d || e ? c & Ga ? b | qb : b & ob ? b | pb : ob : tb;
    }
  }), i(ba, aa, {
    defaults: {
      event: "pan",
      threshold: 10,
      pointers: 1,
      direction: Pa
    },
    getTouchAction: function getTouchAction() {
      var a = this.options.direction,
          b = [];
      return a & Na && b.push(lb), a & Oa && b.push(kb), b;
    },
    directionTest: function directionTest(a) {
      var b = this.options,
          c = !0,
          d = a.distance,
          e = a.direction,
          f = a.deltaX,
          g = a.deltaY;
      return e & b.direction || (b.direction & Na ? (e = 0 === f ? Ia : 0 > f ? Ja : Ka, c = f != this.pX, d = Math.abs(a.deltaX)) : (e = 0 === g ? Ia : 0 > g ? La : Ma, c = g != this.pY, d = Math.abs(a.deltaY))), a.direction = e, c && d > b.threshold && e & b.direction;
    },
    attrTest: function attrTest(a) {
      return aa.prototype.attrTest.call(this, a) && (this.state & ob || !(this.state & ob) && this.directionTest(a));
    },
    emit: function emit(a) {
      this.pX = a.deltaX, this.pY = a.deltaY;
      var b = $(a.direction);
      b && (a.additionalEvent = this.options.event + b), this._super.emit.call(this, a);
    }
  }), i(ca, aa, {
    defaults: {
      event: "pinch",
      threshold: 0,
      pointers: 2
    },
    getTouchAction: function getTouchAction() {
      return [jb];
    },
    attrTest: function attrTest(a) {
      return this._super.attrTest.call(this, a) && (Math.abs(a.scale - 1) > this.options.threshold || this.state & ob);
    },
    emit: function emit(a) {
      if (1 !== a.scale) {
        var b = a.scale < 1 ? "in" : "out";
        a.additionalEvent = this.options.event + b;
      }

      this._super.emit.call(this, a);
    }
  }), i(da, Y, {
    defaults: {
      event: "press",
      pointers: 1,
      time: 251,
      threshold: 9
    },
    getTouchAction: function getTouchAction() {
      return [hb];
    },
    process: function process(a) {
      var b = this.options,
          c = a.pointers.length === b.pointers,
          d = a.distance < b.threshold,
          f = a.deltaTime > b.time;
      if (this._input = a, !d || !c || a.eventType & (Ga | Ha) && !f) this.reset();else if (a.eventType & Ea) this.reset(), this._timer = e(function () {
        this.state = rb, this.tryEmit();
      }, b.time, this);else if (a.eventType & Ga) return rb;
      return tb;
    },
    reset: function reset() {
      clearTimeout(this._timer);
    },
    emit: function emit(a) {
      this.state === rb && (a && a.eventType & Ga ? this.manager.emit(this.options.event + "up", a) : (this._input.timeStamp = ra(), this.manager.emit(this.options.event, this._input)));
    }
  }), i(ea, aa, {
    defaults: {
      event: "rotate",
      threshold: 0,
      pointers: 2
    },
    getTouchAction: function getTouchAction() {
      return [jb];
    },
    attrTest: function attrTest(a) {
      return this._super.attrTest.call(this, a) && (Math.abs(a.rotation) > this.options.threshold || this.state & ob);
    }
  }), i(fa, aa, {
    defaults: {
      event: "swipe",
      threshold: 10,
      velocity: .3,
      direction: Na | Oa,
      pointers: 1
    },
    getTouchAction: function getTouchAction() {
      return ba.prototype.getTouchAction.call(this);
    },
    attrTest: function attrTest(a) {
      var b,
          c = this.options.direction;
      return c & (Na | Oa) ? b = a.overallVelocity : c & Na ? b = a.overallVelocityX : c & Oa && (b = a.overallVelocityY), this._super.attrTest.call(this, a) && c & a.offsetDirection && a.distance > this.options.threshold && a.maxPointers == this.options.pointers && qa(b) > this.options.velocity && a.eventType & Ga;
    },
    emit: function emit(a) {
      var b = $(a.offsetDirection);
      b && this.manager.emit(this.options.event + b, a), this.manager.emit(this.options.event, a);
    }
  }), i(ga, Y, {
    defaults: {
      event: "tap",
      pointers: 1,
      taps: 1,
      interval: 300,
      time: 250,
      threshold: 9,
      posThreshold: 10
    },
    getTouchAction: function getTouchAction() {
      return [ib];
    },
    process: function process(a) {
      var b = this.options,
          c = a.pointers.length === b.pointers,
          d = a.distance < b.threshold,
          f = a.deltaTime < b.time;
      if (this.reset(), a.eventType & Ea && 0 === this.count) return this.failTimeout();

      if (d && f && c) {
        if (a.eventType != Ga) return this.failTimeout();
        var g = this.pTime ? a.timeStamp - this.pTime < b.interval : !0,
            h = !this.pCenter || H(this.pCenter, a.center) < b.posThreshold;
        this.pTime = a.timeStamp, this.pCenter = a.center, h && g ? this.count += 1 : this.count = 1, this._input = a;
        var i = this.count % b.taps;
        if (0 === i) return this.hasRequireFailures() ? (this._timer = e(function () {
          this.state = rb, this.tryEmit();
        }, b.interval, this), ob) : rb;
      }

      return tb;
    },
    failTimeout: function failTimeout() {
      return this._timer = e(function () {
        this.state = tb;
      }, this.options.interval, this), tb;
    },
    reset: function reset() {
      clearTimeout(this._timer);
    },
    emit: function emit() {
      this.state == rb && (this._input.tapCount = this.count, this.manager.emit(this.options.event, this._input));
    }
  }), ha.VERSION = "2.0.8", ha.defaults = {
    domEvents: !1,
    touchAction: gb,
    enable: !0,
    inputTarget: null,
    inputClass: null,
    preset: [[ea, {
      enable: !1
    }], [ca, {
      enable: !1
    }, ["rotate"]], [fa, {
      direction: Na
    }], [ba, {
      direction: Na
    }, ["swipe"]], [ga], [ga, {
      event: "doubletap",
      taps: 2
    }, ["tap"]], [da]],
    cssProps: {
      userSelect: "none",
      touchSelect: "none",
      touchCallout: "none",
      contentZooming: "none",
      userDrag: "none",
      tapHighlightColor: "rgba(0,0,0,0)"
    }
  };
  var ub = 1,
      vb = 2;
  ia.prototype = {
    set: function set(a) {
      return la(this.options, a), a.touchAction && this.touchAction.update(), a.inputTarget && (this.input.destroy(), this.input.target = a.inputTarget, this.input.init()), this;
    },
    stop: function stop(a) {
      this.session.stopped = a ? vb : ub;
    },
    recognize: function recognize(a) {
      var b = this.session;

      if (!b.stopped) {
        this.touchAction.preventDefaults(a);
        var c,
            d = this.recognizers,
            e = b.curRecognizer;
        (!e || e && e.state & rb) && (e = b.curRecognizer = null);

        for (var f = 0; f < d.length;) {
          c = d[f], b.stopped === vb || e && c != e && !c.canRecognizeWith(e) ? c.reset() : c.recognize(a), !e && c.state & (ob | pb | qb) && (e = b.curRecognizer = c), f++;
        }
      }
    },
    get: function get(a) {
      if (a instanceof Y) return a;

      for (var b = this.recognizers, c = 0; c < b.length; c++) {
        if (b[c].options.event == a) return b[c];
      }

      return null;
    },
    add: function add(a) {
      if (f(a, "add", this)) return this;
      var b = this.get(a.options.event);
      return b && this.remove(b), this.recognizers.push(a), a.manager = this, this.touchAction.update(), a;
    },
    remove: function remove(a) {
      if (f(a, "remove", this)) return this;

      if (a = this.get(a)) {
        var b = this.recognizers,
            c = r(b, a);
        -1 !== c && (b.splice(c, 1), this.touchAction.update());
      }

      return this;
    },
    on: function on(a, b) {
      if (a !== d && b !== d) {
        var c = this.handlers;
        return g(q(a), function (a) {
          c[a] = c[a] || [], c[a].push(b);
        }), this;
      }
    },
    off: function off(a, b) {
      if (a !== d) {
        var c = this.handlers;
        return g(q(a), function (a) {
          b ? c[a] && c[a].splice(r(c[a], b), 1) : delete c[a];
        }), this;
      }
    },
    emit: function emit(a, b) {
      this.options.domEvents && ka(a, b);
      var c = this.handlers[a] && this.handlers[a].slice();

      if (c && c.length) {
        b.type = a, b.preventDefault = function () {
          b.srcEvent.preventDefault();
        };

        for (var d = 0; d < c.length;) {
          c[d](b), d++;
        }
      }
    },
    destroy: function destroy() {
      this.element && ja(this, !1), this.handlers = {}, this.session = {}, this.input.destroy(), this.element = null;
    }
  }, la(ha, {
    INPUT_START: Ea,
    INPUT_MOVE: Fa,
    INPUT_END: Ga,
    INPUT_CANCEL: Ha,
    STATE_POSSIBLE: nb,
    STATE_BEGAN: ob,
    STATE_CHANGED: pb,
    STATE_ENDED: qb,
    STATE_RECOGNIZED: rb,
    STATE_CANCELLED: sb,
    STATE_FAILED: tb,
    DIRECTION_NONE: Ia,
    DIRECTION_LEFT: Ja,
    DIRECTION_RIGHT: Ka,
    DIRECTION_UP: La,
    DIRECTION_DOWN: Ma,
    DIRECTION_HORIZONTAL: Na,
    DIRECTION_VERTICAL: Oa,
    DIRECTION_ALL: Pa,
    Manager: ia,
    Input: x,
    TouchAction: V,
    TouchInput: P,
    MouseInput: L,
    PointerEventInput: M,
    TouchMouseInput: R,
    SingleTouchInput: N,
    Recognizer: Y,
    AttrRecognizer: aa,
    Tap: ga,
    Pan: ba,
    Swipe: fa,
    Pinch: ca,
    Rotate: ea,
    Press: da,
    on: m,
    off: n,
    each: g,
    merge: ta,
    extend: sa,
    assign: la,
    inherit: i,
    bindFn: j,
    prefixed: u
  });
  var wb = "undefined" != typeof a ? a : "undefined" != typeof self ? self : {};
  wb.Hammer = ha,  true ? !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
    return ha;
  }).call(exports, __webpack_require__, exports, module),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;
}(window, document, "Hammer");

/***/ }),

/***/ "./resources/assets/js/site/InputHandler.js":
/*!**************************************************!*\
  !*** ./resources/assets/js/site/InputHandler.js ***!
  \**************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _global_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global/helpers */ "./resources/assets/js/global/helpers.js");

/* ==========================================================================
    Input handler

    This handler can be remove when the css support for :focus-within is better
 ========================================================================== */

var InputHandler = {
  inputFields: [],
  selectFields: [],
  fields: [],
  init: function init() {
    // Get the form inputs
    // InputHandler.inputFields = document.querySelectorAll('form input, form textarea');
    // InputHandler.selectFields = document.querySelectorAll('form select');
    InputHandler.fields = document.querySelectorAll('form input, form textarea, form select');
    var fieldsLength = InputHandler.fields.length;

    for (var i = 0; i < fieldsLength; i++) {
      var field = InputHandler.fields[i];
      var fieldId = field.getAttribute('id');
      var fieldType = field.tagName;
      fieldType = fieldType.toLowerCase();
      var depth = 0;
      if (fieldType === 'select') depth = 1; // Check if there is an id on the input

      if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(fieldId)) {
        var fieldLabel = document.querySelector('form label[for="' + fieldId + '"]'); // // And if there is a belonging label

        if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(fieldLabel)) {
          InputHandler.addEventListenersToInput(field, depth);
        }
      }
    }
  },
  addEventListenersToInput: function addEventListenersToInput(field) {
    var additionalNesting = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
    // Add the fill class and trigger removeFocus so the input will be automatic be marked as filled or not
    var parentElement = field.parentNode;

    for (var ad = 0; ad < additionalNesting; ad++) {
      parentElement = parentElement.parentNode;
    }

    parentElement.classList.add('filled');
    InputHandler.removeFocus(field, additionalNesting);
    field.addEventListener('focus', function () {
      // We loop through the input elements because autocomplete (on chrome) triggers al the focus elements but none focus out
      var fieldsLength = InputHandler.fields.length;

      for (var i = 0; i < fieldsLength; i++) {
        var loopedField = InputHandler.fields[i]; // Trigger add focus on this focused element

        if (loopedField === field) {
          InputHandler.addFocus(this, additionalNesting);
        } // Remove focus on all other fields
        else {
          InputHandler.removeFocus(loopedField);
        }
      }
    });
    field.addEventListener('focusout', function () {
      InputHandler.removeFocus(this, additionalNesting);
    });
  },
  addFocus: function addFocus(field) {
    var additionalNesting = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;

    if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(field)) {
      var fieldId = field.getAttribute('id');
      var parentElement = field.parentNode;

      for (var ad = 0; ad < additionalNesting; ad++) {
        parentElement = parentElement.parentNode;
      }

      parentElement.classList.add('focused');
      parentElement.classList.add('filled'); // If there is a error message remove it on focus

      var errorMessage = document.querySelector('form .error-message#' + fieldId + '-error');

      if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(errorMessage)) {
        errorMessage.classList.add('fade-out');
      }
    }
  },
  // Reset the label location only if the input is empty
  removeFocus: function removeFocus(field) {
    var additionalNesting = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;

    if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(field)) {
      var fieldValue = field.value;
      var parentElement = field.parentNode;

      for (var ad = 0; ad < additionalNesting; ad++) {
        parentElement = parentElement.parentNode;
      }

      parentElement.classList.remove('focused');

      if (!Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(fieldValue) || fieldValue === '') {
        parentElement.classList.remove('filled');
      }
    }
  }
};
/* harmony default export */ __webpack_exports__["default"] = (InputHandler);

/***/ }),

/***/ "./resources/assets/js/site/app.js":
/*!*****************************************!*\
  !*** ./resources/assets/js/site/app.js ***!
  \*****************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _eventSignUpFormHandler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./eventSignUpFormHandler */ "./resources/assets/js/site/eventSignUpFormHandler.js");
/* harmony import */ var _browserHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./browserHandler */ "./resources/assets/js/site/browserHandler.js");
/* harmony import */ var _companyFilterHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./companyFilterHandler */ "./resources/assets/js/site/companyFilterHandler.js");
/* harmony import */ var _cookieHandler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cookieHandler */ "./resources/assets/js/site/cookieHandler.js");
/* harmony import */ var _dropzoneHandler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./dropzoneHandler */ "./resources/assets/js/site/dropzoneHandler.js");
/* harmony import */ var _InputHandler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./InputHandler */ "./resources/assets/js/site/InputHandler.js");
/* harmony import */ var _mapsHandler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./mapsHandler */ "./resources/assets/js/site/mapsHandler.js");
/* harmony import */ var _mollieFormHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./mollieFormHandler */ "./resources/assets/js/site/mollieFormHandler.js");
/* harmony import */ var _navigationHandler__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./navigationHandler */ "./resources/assets/js/site/navigationHandler.js");
/* harmony import */ var _paymentFormHandler__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./paymentFormHandler */ "./resources/assets/js/site/paymentFormHandler.js");
/* harmony import */ var _paymentMethodsHandler__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./paymentMethodsHandler */ "./resources/assets/js/site/paymentMethodsHandler.js");
/* harmony import */ var _resizeHandler__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./resizeHandler */ "./resources/assets/js/site/resizeHandler.js");
/* harmony import */ var _scrollHandler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./scrollHandler */ "./resources/assets/js/site/scrollHandler.js");
/* harmony import */ var _scrollToHandler__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./scrollToHandler */ "./resources/assets/js/site/scrollToHandler.js");
/* harmony import */ var _searchBarHandler__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./searchBarHandler */ "./resources/assets/js/site/searchBarHandler.js");
/* harmony import */ var _shareButtonsHandler__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./shareButtonsHandler */ "./resources/assets/js/site/shareButtonsHandler.js");
/* harmony import */ var _youtubeHandler__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./youtubeHandler */ "./resources/assets/js/site/youtubeHandler.js");
/* harmony import */ var _searchHandler__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./searchHandler */ "./resources/assets/js/site/searchHandler.js");
/* harmony import */ var _sliderHandler__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./sliderHandler */ "./resources/assets/js/site/sliderHandler.js");



















_eventSignUpFormHandler__WEBPACK_IMPORTED_MODULE_0__["default"].init();
_browserHandler__WEBPACK_IMPORTED_MODULE_1__["default"].init();
_companyFilterHandler__WEBPACK_IMPORTED_MODULE_2__["default"].init();
_cookieHandler__WEBPACK_IMPORTED_MODULE_3__["default"].init();
_dropzoneHandler__WEBPACK_IMPORTED_MODULE_4__["default"].init();
_InputHandler__WEBPACK_IMPORTED_MODULE_5__["default"].init();
_mapsHandler__WEBPACK_IMPORTED_MODULE_6__["default"].init();
_mollieFormHandler__WEBPACK_IMPORTED_MODULE_7__["default"].init();
_navigationHandler__WEBPACK_IMPORTED_MODULE_8__["default"].init();
_paymentFormHandler__WEBPACK_IMPORTED_MODULE_9__["default"].init();
_paymentMethodsHandler__WEBPACK_IMPORTED_MODULE_10__["default"].init();
_resizeHandler__WEBPACK_IMPORTED_MODULE_11__["default"].init();
_scrollHandler__WEBPACK_IMPORTED_MODULE_12__["default"].init();
_scrollToHandler__WEBPACK_IMPORTED_MODULE_13__["default"].init();
_searchBarHandler__WEBPACK_IMPORTED_MODULE_14__["default"].init();
_shareButtonsHandler__WEBPACK_IMPORTED_MODULE_15__["default"].init();
_youtubeHandler__WEBPACK_IMPORTED_MODULE_16__["default"].init();
new _searchHandler__WEBPACK_IMPORTED_MODULE_17__["default"](); // unused ???
// require("sliderHandler");

/***/ }),

/***/ "./resources/assets/js/site/browserHandler.js":
/*!****************************************************!*\
  !*** ./resources/assets/js/site/browserHandler.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* ==========================================================================
   Browser Handler
 ========================================================================== */
var BrowserHandler = {
  userAgent: '',
  browserInfo: '',
  init: function init() {
    BrowserHandler.userAgent = window.navigator.userAgent;
    BrowserHandler.browserInfo = BrowserHandler.getBrowserInfo();
    BrowserHandler.handleIE();
    BrowserHandler.handleSafari();
  },
  handleIE: function handleIE() {
    // Detect versions below ie11
    var msie = BrowserHandler.userAgent.indexOf('MSIE ');
    var ielt11 = msie > 0; // Detect ie11

    var ie11 = !!navigator.userAgent.match(/Trident.*rv\:11\./); // If Internet Explorer

    if (ielt11 || ie11) {
      // Default version
      var version = '11'; // Way to detect version < 11

      if (ielt11) version = parseInt(BrowserHandler.userAgent.substring(msie + 5, BrowserHandler.userAgent.indexOf(".", msie))); // Append classes to HTML (we have to do this separately because else ie will fail)

      document.body.classList.add('ie');
      document.body.classList.add('v' + version);
    }
  },
  // Fallback for older safari version
  handleSafari: function handleSafari() {
    if (BrowserHandler.browserInfo.name === 'Safari' && BrowserHandler.browserInfo.version <= 10) {
      document.getElementsByTagName('html')[0].classList.add('ie');
    }
  },
  getBrowserInfo: function getBrowserInfo() {
    var ua = navigator.userAgent,
        tem,
        M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];

    if (/trident/i.test(M[1])) {
      tem = /\brv[ :]+(\d+)/g.exec(ua) || [];
      return {
        name: 'IE ',
        version: tem[1] || ''
      };
    }

    if (M[1] === 'Chrome') {
      tem = ua.match(/\bOPR\/(\d+)/);

      if (tem != null) {
        return {
          name: 'Opera',
          version: tem[1]
        };
      }
    }

    M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];

    if ((tem = ua.match(/version\/(\d+)/i)) != null) {
      M.splice(1, 1, tem[1]);
    }

    return {
      name: M[0],
      version: M[1]
    };
  }
};
/* harmony default export */ __webpack_exports__["default"] = (BrowserHandler);

/***/ }),

/***/ "./resources/assets/js/site/companyFilterHandler.js":
/*!**********************************************************!*\
  !*** ./resources/assets/js/site/companyFilterHandler.js ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _global_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global/helpers */ "./resources/assets/js/global/helpers.js");

/* ==========================================================================
   Company Filter Handler
 ========================================================================== */

var CompanyFilterHandler = {
  companyFilterElement: null,
  companiesGridElement: null,
  companiesInGrid: [],
  nCompaniesInGrid: 0,
  branchFilterId: 0,
  regionFilterId: 0,
  init: function init() {
    CompanyFilterHandler.companyFilterElement = document.querySelector('.companies .filter-menu');
    CompanyFilterHandler.companiesGridElement = document.querySelector('.companies .companies--grid'); // Check if the needed elements are present

    if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(CompanyFilterHandler.companyFilterElement) && CompanyFilterHandler.companiesGridElement) {
      // Get all companies in grid
      CompanyFilterHandler.companiesInGrid = CompanyFilterHandler.companiesGridElement.querySelectorAll('.company');
      CompanyFilterHandler.nCompaniesInGrid = CompanyFilterHandler.companiesInGrid.length; // Get all filters in the filter-menu

      var filters = CompanyFilterHandler.companyFilterElement.querySelectorAll('select');
      var filtersLength = filters.length; // Add event listeners to filters

      for (var i = 0; i < filtersLength; i++) {
        CompanyFilterHandler.addEventListenersToFilter(filters[i]);
      }
    }
  },
  addEventListenersToFilter: function addEventListenersToFilter(filter) {
    // Get the filter type
    filter.addEventListener('change', function () {
      var filterValue = this.value;
      var filterType = this.id;
      if (filterType === 'category') CompanyFilterHandler.branchFilterId = filterValue;
      if (filterType === 'region') CompanyFilterHandler.regionFilterId = filterValue;
      CompanyFilterHandler.updateCompanies();
    });
  },
  updateCompanies: function updateCompanies() {
    for (var i = 0; i < CompanyFilterHandler.nCompaniesInGrid; i++) {
      var company = CompanyFilterHandler.companiesInGrid[i];
      var companyRegion = company.getAttribute('data-region');
      var companyBranch = company.getAttribute('data-category');
      if (CompanyFilterHandler.regionFilterId == 0 || companyRegion == CompanyFilterHandler.regionFilterId) company.classList.remove('is-hidden-by-region-filter');else company.classList.add('is-hidden-by-region-filter');
      if (CompanyFilterHandler.branchFilterId == 0 || companyBranch == CompanyFilterHandler.branchFilterId) company.classList.remove('is-hidden-by-branch-filter');else company.classList.add('is-hidden-by-branch-filter');
    }
  }
};
/* harmony default export */ __webpack_exports__["default"] = (CompanyFilterHandler);

/***/ }),

/***/ "./resources/assets/js/site/cookieHandler.js":
/*!***************************************************!*\
  !*** ./resources/assets/js/site/cookieHandler.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _global_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global/helpers */ "./resources/assets/js/global/helpers.js");

/* ==========================================================================
   Cookie handler
   - Primary usage for toggling the cookie message and/or switch
 ========================================================================== */

var CookieHandler = {
  cookieMessage: null,
  cookieSwitch: null,
  cookieFadeOutAnimationDuration: 400,
  acceptTracking: false,
  // Initialize cookie handler
  init: function init() {
    // Bind cookie message without tracking to Handler
    CookieHandler.cookieMessage = document.getElementById('cookie-message'); // If isset init the functions for cookie message without tracking

    if (CookieHandler.cookieMessage) {
      CookieHandler.initCookieMessageWithoutTracking();
    } else {
      // Else try to connect cookie message with tracking to Handler
      CookieHandler.cookieMessage = document.getElementById('cookie-message-overlay'); // If isset init the functions for cookie message with tracking

      if (CookieHandler.cookieMessage) {
        CookieHandler.initCookieMessageWithTracking();
      }
    } // If either type of cookie has been found check if settings are defined


    if (CookieHandler.cookieMessage) {
      CookieHandler.checkForCookieSettings();
    } // Bind cookie switch to Handler


    CookieHandler.cookieSwitch = document.getElementById('cookie-switch'); // If isset init the functions for cookie switch

    if (CookieHandler.cookieSwitch) {
      CookieHandler.initCookieSwitch();
    }
  },
  // Init the cookie message actions without tracking
  initCookieMessageWithoutTracking: function initCookieMessageWithoutTracking() {
    var closeButton = CookieHandler.cookieMessage.querySelector('.close-button');

    if (closeButton) {
      closeButton.addEventListener('click', CookieHandler.closeCookieMessage);
    }
  },
  // Init the cookie message actions with tracking
  initCookieMessageWithTracking: function initCookieMessageWithTracking() {
    // Open the cookie settings event
    var openCookieSettingsButton = CookieHandler.cookieMessage.querySelector('.open-menu');

    if (openCookieSettingsButton) {
      openCookieSettingsButton.addEventListener('click', CookieHandler.openCookieSettings);
    } // Toggle of the tracking input


    var toggleTrackingInputWrapper = CookieHandler.cookieMessage.querySelector('#cookie-settings-menu #trackingCookie');

    if (toggleTrackingInputWrapper) {
      var toggleTrackingInput = toggleTrackingInputWrapper.querySelector('input');
      toggleTrackingInput.addEventListener('change', CookieHandler.toggleTrackingSetting);

      if (toggleTrackingInput.checked === true) {
        CookieHandler.acceptTracking = true;
      }
    } // Accept / Save cookies button event


    var acceptButton = CookieHandler.cookieMessage.querySelector('.accept-cookie-button');

    if (acceptButton) {
      acceptButton.addEventListener('click', CookieHandler.setCookieSettings);
    }
  },
  // Init the cookie switch actions
  initCookieSwitch: function initCookieSwitch() {
    // Toggle of the tracking input
    var toggleTrackingInputWrapper = CookieHandler.cookieSwitch.querySelector('#trackingCookie');

    if (toggleTrackingInputWrapper) {
      var toggleTrackingInput = toggleTrackingInputWrapper.querySelector('input');
      toggleTrackingInput.addEventListener('change', CookieHandler.toggleTrackingSetting); // Force the state of the cookie switch input because the pop-up is forced on checked
      // while the switch checks by php if the cookie really exist or not

      if (toggleTrackingInput.checked === true) {
        CookieHandler.acceptTracking = true;
      } else {
        CookieHandler.acceptTracking = false;
      }
    } // Save cookies button event


    var saveButton = CookieHandler.cookieSwitch.querySelector('#save-cookie-settings');

    if (saveButton) {
      saveButton.addEventListener('click', function () {
        CookieHandler.cookieFadeOutAnimationDuration = 0; // On the switch click we want no delay :)

        CookieHandler.setCookieSettings();
      });
    }
  },
  checkForCookieSettings: function checkForCookieSettings() {
    if (_global_helpers__WEBPACK_IMPORTED_MODULE_0__["Cookie"].get('cookieMessage')) {
      CookieHandler.cookieMessage.classList.add('accepted');
    } else {
      CookieHandler.cookieMessage.classList.remove('accepted');
    }
  },
  closeCookieMessage: function closeCookieMessage() {
    _global_helpers__WEBPACK_IMPORTED_MODULE_0__["Cookie"].set('cookieMessage', true, 90);
    CookieHandler.cookieMessage.classList.add('transition-out');
  },
  openCookieSettings: function openCookieSettings() {
    CookieHandler.cookieMessage.querySelector('#cookie-settings-menu').classList.add('edit');
    CookieHandler.cookieMessage.querySelector('#message-description').classList.add('hide');
  },
  toggleTrackingSetting: function toggleTrackingSetting() {
    if (CookieHandler.acceptTracking) {
      CookieHandler.acceptTracking = false;
    } else {
      CookieHandler.acceptTracking = true;
    }
  },
  setCookieSettings: function setCookieSettings() {
    // Set tracking cookie or delete it if isset according to the desired settings
    if (CookieHandler.acceptTracking) {
      _global_helpers__WEBPACK_IMPORTED_MODULE_0__["Cookie"].set('trackingCookieAccepted', 'true', 90);
    } else {
      if (_global_helpers__WEBPACK_IMPORTED_MODULE_0__["Cookie"].get('trackingCookieAccepted')) {
        _global_helpers__WEBPACK_IMPORTED_MODULE_0__["Cookie"].erase('trackingCookieAccepted');
      }
    }

    CookieHandler.closeCookieMessage(); // Reload after animation to automatically trigger the tracking after accepting it

    setTimeout(function () {
      location.reload();
    }, CookieHandler.cookieFadeOutAnimationDuration);
  }
};
/* harmony default export */ __webpack_exports__["default"] = (CookieHandler);

/***/ }),

/***/ "./resources/assets/js/site/dropzoneHandler.js":
/*!*****************************************************!*\
  !*** ./resources/assets/js/site/dropzoneHandler.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _lib_dropzone__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../lib/dropzone */ "./resources/assets/js/lib/dropzone.js");
/* harmony import */ var _lib_dropzone__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_lib_dropzone__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _global_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../global/helpers */ "./resources/assets/js/global/helpers.js");

 // Disable auto discover

_lib_dropzone__WEBPACK_IMPORTED_MODULE_0___default.a.autoDiscover = false;
var DropzoneHandler = {
  dropzones: [],
  defaultSettings: {
    maxFilesize: 2,
    // MB
    maxFiles: 1,
    acceptedFiles: 'image/*',
    addRemoveLinks: true
  },
  init: function init() {
    DropzoneHandler.dropzones = document.querySelectorAll('.form.dropzone');
    var dropzoneAmount = DropzoneHandler.dropzones.length;

    for (var i = 0; i < dropzoneAmount; i++) {
      DropzoneHandler.createDropzone(DropzoneHandler.dropzones[i]);
    }
  },
  createDropzone: function createDropzone(node) {
    var settings = DropzoneHandler.defaultSettings;
    settings.url = node.getAttribute('action');
    if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_1__["isset"])(node.getAttribute('data-placeholder-text'))) settings.dictDefaultMessage = node.getAttribute('data-placeholder-text');
    if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_1__["isset"])(node.getAttribute('data-dictFileTooBig'))) settings.dictFileTooBig = node.getAttribute('data-dictFileTooBig');
    if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_1__["isset"])(node.getAttribute('data-dictMaxFilesExceeded'))) settings.dictMaxFilesExceeded = node.getAttribute('data-dictMaxFilesExceeded');

    if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_1__["isset"])(node.getAttribute('data-max-images'))) {
      var maxFiles = parseInt(node.getAttribute('data-max-images'));
      settings.maxFiles = maxFiles;
    }

    var dropzone = new _lib_dropzone__WEBPACK_IMPORTED_MODULE_0___default.a(node, settings);
    dropzone.deleteRoute = node.getAttribute('data-delete');
    dropzone.on('removedfile', function (file) {
      var imageId = file.name;
      imageId = imageId.replace('image-', ''); // Send post request to delete the file

      DropzoneHandler.deleteFile(imageId, dropzone); // Determine if the max file limit is greater then 0

      dropzone.options.maxFiles = dropzone.options.maxFiles + 1;
      if (dropzone.options.maxFiles >= 1) node.classList.remove('dz-max-files-reached');
    });
    var images = node.querySelectorAll('var.image');
    var imageAmount = images.length;

    for (var i = 0; i < imageAmount; i++) {
      var image = images[i];
      var mockImage = {
        name: "image-" + image.getAttribute('data-image-id'),
        size: 12345
      }; // Call the default addedfile event handler

      dropzone.emit("addedfile", mockImage); // And optionally show the thumbnail of the file:

      dropzone.emit("thumbnail", mockImage, image.getAttribute('data-image-url')); // Make sure that there is no progress bar, etc...

      dropzone.emit("complete", mockImage); // Determine if the max file limit is 0

      dropzone.options.maxFiles = dropzone.options.maxFiles - 1;
      if (dropzone.options.maxFiles === 0) node.classList.add('dz-max-files-reached');
    }
  },
  deleteFile: function deleteFile(id, dropzone) {
    // Create new XHR Object
    var request = new XMLHttpRequest();
    request.open('POST', dropzone.deleteRoute);
    request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); // bind our event listener to the "load" event.
    // "load" is fired when the response to our request is completed and without error.

    request.onreadystatechange = function () {
      if (this.readyState === 4) {
        if (this.status >= 200 && this.status < 400) {
          // Success!
          var resp = this.responseText;
        } else {
          // Error :(
          console.log('Something went wrong...');
        }
      }
    };

    request.send('imageId=' + id);
    request = null;
  }
};
/* harmony default export */ __webpack_exports__["default"] = (DropzoneHandler);

/***/ }),

/***/ "./resources/assets/js/site/eventSignUpFormHandler.js":
/*!************************************************************!*\
  !*** ./resources/assets/js/site/eventSignUpFormHandler.js ***!
  \************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _global_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global/helpers */ "./resources/assets/js/global/helpers.js");

/* ==========================================================================
   Event Sign Up Form Handler
 ========================================================================== */

var EventSignUpFormHandler = {
  form: null,
  init: function init() {
    EventSignUpFormHandler.form = document.getElementById('eventSignUpForm');

    if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(EventSignUpFormHandler.form)) {
      var otherInvoiceMailAddress = EventSignUpFormHandler.form.querySelector('#other_invoice');

      if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(otherInvoiceMailAddress)) {
        otherInvoiceMailAddress.addEventListener('change', function () {
          EventSignUpFormHandler.toggleInvoiceMailAddressField(this);
        });
      }

      var otherInvoiceCompanyName = EventSignUpFormHandler.form.querySelector('#other_invoice_company_name');

      if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(otherInvoiceCompanyName)) {
        otherInvoiceCompanyName.addEventListener('change', function () {
          EventSignUpFormHandler.toggleInvoiceCompanyNameField(this);
        });
      }

      var plusOne = EventSignUpFormHandler.form.querySelector('#plus_one');

      if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(plusOne)) {
        plusOne.addEventListener('change', function () {
          EventSignUpFormHandler.togglePlusOneFields(this);
        });
      }
    }
  },
  toggleInvoiceMailAddressField: function toggleInvoiceMailAddressField(checkbox) {
    var invoiceMailAddressContainer = EventSignUpFormHandler.form.querySelector('.other-invoice-wrapper');
    if (checkbox.checked) invoiceMailAddressContainer.classList.add('is-checked');else invoiceMailAddressContainer.classList.remove('is-checked');
  },
  toggleInvoiceCompanyNameField: function toggleInvoiceCompanyNameField(checkbox) {
    var invoiceCompanyNameContainer = EventSignUpFormHandler.form.querySelector('.other-invoice-company-wrapper');
    if (checkbox.checked) invoiceCompanyNameContainer.classList.add('is-checked');else invoiceCompanyNameContainer.classList.remove('is-checked');
  },
  togglePlusOneFields: function togglePlusOneFields(checkbox) {
    var plusOneFieldContainer = EventSignUpFormHandler.form.querySelector('.plus-one-additional-fields');
    var plusOnePaymentMessage = EventSignUpFormHandler.form.querySelector('.event-sign-up-form__payment-area-plus-one-payment');

    if (checkbox.checked) {
      plusOneFieldContainer.classList.add('is-checked');
      plusOnePaymentMessage.classList.add('is-visible');
    } else {
      plusOneFieldContainer.classList.remove('is-checked');
      plusOnePaymentMessage.classList.remove('is-visible');
    }
  }
};
/* harmony default export */ __webpack_exports__["default"] = (EventSignUpFormHandler);

/***/ }),

/***/ "./resources/assets/js/site/mapsHandler.js":
/*!*************************************************!*\
  !*** ./resources/assets/js/site/mapsHandler.js ***!
  \*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _global_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global/helpers */ "./resources/assets/js/global/helpers.js");

/* ==========================================================================
    Google Maps handler
    - https://developers.google.com/maps/documentation/javascript/adding-a-google-map
 ========================================================================== */

var MapsHandler = {
  map: '',
  key: 'AIzaSyCVGPUmRmQRxXvzzWu3Xyu77XebQxQ-f4Y',
  location: {
    lat: 51.2618222,
    lng: 5.5965538
  },
  styling: '',
  init: function init() {
    // Get map by id
    MapsHandler.map = document.getElementById('map'); // Check if a map is defined

    if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(MapsHandler.map)) {
      if (MapsHandler.map.hasAttribute('data-google-lat')) MapsHandler.location.lat = parseFloat(MapsHandler.map.getAttribute('data-google-lat'));
      if (MapsHandler.map.hasAttribute('data-google-lng')) MapsHandler.location.lng = parseFloat(MapsHandler.map.getAttribute('data-google-lng'));
      MapsHandler.setCustomStyling(); // See if google variable exists

      if (typeof google == 'undefined' || typeof google.maps == 'undefined') {
        // Load external script
        getScript('https://maps.googleapis.com/maps/api/js?key=' + MapsHandler.key, MapsHandler.drawMap);
      } else {
        MapsHandler.drawMap();
      }
    }
  },
  drawMap: function drawMap() {
    // Create a map
    var map = new google.maps.Map(MapsHandler.map, {
      zoom: 11,
      center: MapsHandler.location,
      disableDefaultUI: true,
      styles: MapsHandler.styling
    }); // Add a marker

    var marker = new google.maps.Marker({
      position: MapsHandler.location,
      map: map
    });
  },
  setCustomStyling: function setCustomStyling() {
    MapsHandler.styling = [{
      "featureType": "poi",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#747474"
      }, {
        "lightness": "23"
      }]
    }, {
      "featureType": "poi.attraction",
      "elementType": "geometry.fill",
      "stylers": [{
        "color": "#f38eb0"
      }]
    }, {
      "featureType": "poi.government",
      "elementType": "geometry.fill",
      "stylers": [{
        "color": "#ced7db"
      }]
    }, {
      "featureType": "poi.medical",
      "elementType": "geometry.fill",
      "stylers": [{
        "color": "#ffa5a8"
      }]
    }, {
      "featureType": "poi.park",
      "elementType": "geometry.fill",
      "stylers": [{
        "color": "#c7e5c8"
      }]
    }, {
      "featureType": "poi.place_of_worship",
      "elementType": "geometry.fill",
      "stylers": [{
        "color": "#d6cbc7"
      }]
    }, {
      "featureType": "poi.school",
      "elementType": "geometry.fill",
      "stylers": [{
        "color": "#c4c9e8"
      }]
    }, {
      "featureType": "poi.sports_complex",
      "elementType": "geometry.fill",
      "stylers": [{
        "color": "#b1eaf1"
      }]
    }, {
      "featureType": "road",
      "elementType": "geometry",
      "stylers": [{
        "lightness": "100"
      }]
    }, {
      "featureType": "road",
      "elementType": "labels",
      "stylers": [{
        "visibility": "off"
      }, {
        "lightness": "100"
      }]
    }, {
      "featureType": "road.highway",
      "elementType": "geometry.fill",
      "stylers": [{
        "color": "#ffd4a5"
      }]
    }, {
      "featureType": "road.arterial",
      "elementType": "geometry.fill",
      "stylers": [{
        "color": "#ffe9d2"
      }]
    }, {
      "featureType": "road.local",
      "elementType": "all",
      "stylers": [{
        "visibility": "simplified"
      }]
    }, {
      "featureType": "road.local",
      "elementType": "geometry.fill",
      "stylers": [{
        "weight": "3.00"
      }]
    }, {
      "featureType": "road.local",
      "elementType": "geometry.stroke",
      "stylers": [{
        "weight": "0.30"
      }]
    }, {
      "featureType": "road.local",
      "elementType": "labels.text",
      "stylers": [{
        "visibility": "on"
      }]
    }, {
      "featureType": "road.local",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#747474"
      }, {
        "lightness": "36"
      }]
    }, {
      "featureType": "road.local",
      "elementType": "labels.text.stroke",
      "stylers": [{
        "color": "#e9e5dc"
      }, {
        "lightness": "30"
      }]
    }, {
      "featureType": "transit.line",
      "elementType": "geometry",
      "stylers": [{
        "visibility": "on"
      }, {
        "lightness": "100"
      }]
    }, {
      "featureType": "water",
      "elementType": "all",
      "stylers": [{
        "color": "#d2e7f7"
      }]
    }];
  }
};
/* harmony default export */ __webpack_exports__["default"] = (MapsHandler);

/***/ }),

/***/ "./resources/assets/js/site/mollieFormHandler.js":
/*!*******************************************************!*\
  !*** ./resources/assets/js/site/mollieFormHandler.js ***!
  \*******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _global_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global/helpers */ "./resources/assets/js/global/helpers.js");
/* harmony import */ var _scrollToHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./scrollToHandler */ "./resources/assets/js/site/scrollToHandler.js");

/* ==========================================================================
    Mollie Form handler

    This handler hides the form and shows a create payment message
 ========================================================================== */


var MollieFormHandler = {
  mollieForms: [],
  mollieLoadingMessage: null,
  scrollToMollieLoading: 400,
  init: function init() {
    // Get the form inputs
    MollieFormHandler.mollieForms = document.querySelectorAll('.mollie-form');
    MollieFormHandler.mollieLoadingMessage = document.querySelector('.mollie-loading');
    var mollieFormsLength = MollieFormHandler.mollieForms.length;

    for (var i = 0; i < mollieFormsLength; i++) {
      MollieFormHandler.interveneSubmit(MollieFormHandler.mollieForms[i]);
    }
  },
  interveneSubmit: function interveneSubmit(mollieForm) {
    // Check that the form is really a form
    if (mollieForm.tagName === 'FORM') {
      mollieForm.addEventListener('submit', function (event) {
        event.preventDefault(); // Disable the form

        mollieForm.classList.add('is-disabled'); // Show loading message if append to the view

        if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(MollieFormHandler.mollieLoadingMessage)) {
          MollieFormHandler.mollieLoadingMessage.classList.add('is-visible');
          _scrollToHandler__WEBPACK_IMPORTED_MODULE_1__["default"].duration = MollieFormHandler.scrollToMollieLoading;
          _scrollToHandler__WEBPACK_IMPORTED_MODULE_1__["default"].prepareScrollTo(MollieFormHandler.mollieLoadingMessage.id, false);
        }

        setTimeout(function () {
          // Submit the form as normal
          mollieForm.submit(); // Wait till the mollie loading screen is positioned
        }, MollieFormHandler.scrollToMollieLoading);
      });
    }
  }
};
/* harmony default export */ __webpack_exports__["default"] = (MollieFormHandler);

/***/ }),

/***/ "./resources/assets/js/site/navigationHandler.js":
/*!*******************************************************!*\
  !*** ./resources/assets/js/site/navigationHandler.js ***!
  \*******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _global_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global/helpers */ "./resources/assets/js/global/helpers.js");

/* ==========================================================================
   NavigationHandler handler
   - Primary usage for overlay navigation
   - Secondary if site used a pop-up/slide-in menu
 ========================================================================== */

var NavigationHandler = {
  navElement: '',
  scrolled: 0,
  isActive: false,
  // Initialize click event
  init: function init() {
    // Bind Navigation to Handler
    NavigationHandler.navElement = document.querySelector('.overlay-menu'); // Bind clicks to menu button

    var menuButtons = document.querySelectorAll('.menu-trigger-button');
    var menuButtonsLength = menuButtons.length;

    for (var i = 0; i < menuButtonsLength; i++) {
      var menuButton = menuButtons[i];
      menuButton.addEventListener('click', function () {
        NavigationHandler.toggle();
      });
    }

    var overlayShade = document.querySelector('.overlay-menu--shader');

    if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(overlayShade)) {
      overlayShade.addEventListener('click', function () {
        NavigationHandler.close();
      });
    }

    var overlayClose = document.querySelector('.overlay-menu--close-button');

    if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(overlayClose)) {
      overlayClose.addEventListener('click', function () {
        NavigationHandler.close();
      });
    }

    if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(NavigationHandler.navElement)) {
      setTimeout(function () {
        NavigationHandler.navElement.classList.add('overlay-menu__allow-animation');
      }, 500);
    }
  },
  // Toggle navigation
  toggle: function toggle() {
    if (!NavigationHandler.isActive) NavigationHandler.open();else NavigationHandler.close();
  },
  // Open Navigation
  open: function open() {
    NavigationHandler.scrolled = window.pageYOffset;
    NavigationHandler.navElement.classList.add('overlay-menu__active');
    NavigationHandler.navElement.classList.add('overlay-menu__shader-active');
    NavigationHandler.isActive = true;
    setTimeout(function () {
      document.body.classList.add('preventScroll');
    }, 400);
  },
  // Close Navigation
  close: function close() {
    NavigationHandler.navElement.classList.remove('overlay-menu__active');
    NavigationHandler.navElement.classList.remove('overlay-menu__shader-active');
    NavigationHandler.isActive = false;
    document.body.classList.remove('preventScroll');
    window.scrollTo(0, NavigationHandler.scrolled);
  }
};
/* harmony default export */ __webpack_exports__["default"] = (NavigationHandler);

/***/ }),

/***/ "./resources/assets/js/site/paymentFormHandler.js":
/*!********************************************************!*\
  !*** ./resources/assets/js/site/paymentFormHandler.js ***!
  \********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _global_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global/helpers */ "./resources/assets/js/global/helpers.js");

/* ==========================================================================
   Payment forms Handler
 ========================================================================== */

var PaymentFormHandler = {
  registerForm: null,
  otherInvoiceAddress: false,
  init: function init() {
    PaymentFormHandler.registerForm = document.querySelector('.payment-form');

    if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(PaymentFormHandler.registerForm)) {
      // Shipping Address area checkbox
      var invoiceAddressCheckbox = PaymentFormHandler.registerForm.querySelector('#other_invoice_address');
      invoiceAddressCheckbox.addEventListener('change', function () {
        var invoiceAreaFieldsWrapper = PaymentFormHandler.registerForm.querySelector('.invoice-information');

        if (invoiceAddressCheckbox.checked) {
          invoiceAreaFieldsWrapper.classList.remove('invoice-information--hidden');
          PaymentFormHandler.otherInvoiceAddress = true;
        } else {
          invoiceAreaFieldsWrapper.classList.add('invoice-information--hidden');
          PaymentFormHandler.otherInvoiceAddress = false;
        }
      });
    }
  }
};
/* harmony default export */ __webpack_exports__["default"] = (PaymentFormHandler);

/***/ }),

/***/ "./resources/assets/js/site/paymentMethodsHandler.js":
/*!***********************************************************!*\
  !*** ./resources/assets/js/site/paymentMethodsHandler.js ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _global_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global/helpers */ "./resources/assets/js/global/helpers.js");

/* ==========================================================================
   Payment methods Handler

   Currently only for one form in a page
 ========================================================================== */

var PaymentMethodsHandler = {
  paymentMethodsElement: null,
  init: function init() {
    PaymentMethodsHandler.paymentMethodsElement = document.querySelector('.payment-methods');

    if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(PaymentMethodsHandler.paymentMethodsElement)) {
      var radioButtons = PaymentMethodsHandler.paymentMethodsElement.querySelectorAll('.js-payment-methods-radio');
      var nRadioButtons = radioButtons.length;

      for (var i = 0; i < nRadioButtons; i++) {
        var radioButton = radioButtons[i];
        radioButton.addEventListener('change', function () {
          // Get and remove the current selected state
          var currentSelected = PaymentMethodsHandler.paymentMethodsElement.querySelector('.is-selected');
          if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(currentSelected)) currentSelected.classList.remove('is-selected');
          this.parentElement.classList.add('is-selected');
        });
      }
    }
  }
};
/* harmony default export */ __webpack_exports__["default"] = (PaymentMethodsHandler);

/***/ }),

/***/ "./resources/assets/js/site/resizeHandler.js":
/*!***************************************************!*\
  !*** ./resources/assets/js/site/resizeHandler.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _global_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global/helpers */ "./resources/assets/js/global/helpers.js");

/* ==========================================================================
   Resize handler
   - Handler the objects which are or need to be recalculated on resize
 ========================================================================== */

var ResizeHandler = {
  time: Date.now(),
  timeout: null,
  waitThrottle: 1000,
  waitDebounce: 500,
  //Initialisation
  init: function init() {
    // Trigger start up resize
    ResizeHandler.triggerOnInit(); // Throttle Resize

    window.addEventListener('resize', function () {
      if (ResizeHandler.time + ResizeHandler.waitThrottle - Date.now() < 0) {
        ResizeHandler.triggerThrottle();
        ResizeHandler.time = Date.now();
      }
    }); // Smooth Resize

    window.addEventListener('resize', function () {
      ResizeHandler.triggerSmooth();
    }); // Debounce Resize

    window.addEventListener('resize', function () {
      if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(ResizeHandler.timeout)) clearTimeout(ResizeHandler.timeout);
      ResizeHandler.timeout = setTimeout(ResizeHandler.triggerDebounce, ResizeHandler.waitDebounce);
    });
  },
  // Trigger on start up
  // All function should be in here
  triggerOnInit: function triggerOnInit() {// ResizeHandler.resizeWhatDoesItCostAdvantageFigure();
    // console.log('Initial Resize');
  },
  // Trigger resize functions with throttle (preferred)
  triggerThrottle: function triggerThrottle() {// console.log('Throttled Resize');
  },
  // Trigger resize on debounce
  triggerDebounce: function triggerDebounce() {// console.log('Debounce Resize');
    // ResizeHandler.resizeWhatDoesItCostAdvantageFigure();
  },
  // Trigger resize on the flight
  triggerSmooth: function triggerSmooth() {// console.log('Smooth Resize');
  } // ------------------------------ CUSTOM SCROLL HANDLERS ------------------------------------
  // Example function
  // resizeWhatDoesItCostAdvantageFigure: function () {
  //     var el = document.querySelector('.advantages-own-guiding-row figure');
  //     if(isset(el)){
  //         el.style.maxHeight = 'none';
  //         el.style.maxHeight = el.offsetHeight + 'px';
  //     }
  // },

};
/* harmony default export */ __webpack_exports__["default"] = (ResizeHandler);

/***/ }),

/***/ "./resources/assets/js/site/scrollHandler.js":
/*!***************************************************!*\
  !*** ./resources/assets/js/site/scrollHandler.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _global_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global/helpers */ "./resources/assets/js/global/helpers.js");

/* ==========================================================================
   Scroll handler
   - Handler the objects which are bind on scroll events or visible in viewport
 ========================================================================== */

var ScrollHandler = {
  // Variables for debounce and throttle effects
  time: Date.now(),
  timeout: null,
  waitThrottle: 1000,
  waitDebounce: 300,
  // Variables for scroll direction
  lastScrollTopPosition: 0,
  scrollDirectionDown: true,
  scrollDirectionUp: false,
  //Initialisation
  init: function init() {
    // Trigger start on start up
    ScrollHandler.triggerOnInit(); // Throttle scroll

    window.addEventListener('scroll', function () {
      if (ScrollHandler.time + ScrollHandler.waitThrottle - Date.now() < 0) {
        ScrollHandler.triggerThrottle();
        ScrollHandler.time = Date.now();
      }
    }); // Smooth scroll

    window.addEventListener('scroll', function () {
      ScrollHandler.triggerSmooth();
    }); // Debounce scroll

    window.addEventListener('scroll', function () {
      if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(ScrollHandler.timeout)) clearTimeout(ScrollHandler.timeout);
      ScrollHandler.timeout = setTimeout(ScrollHandler.triggerDebounce, ScrollHandler.waitDebounce);
    });
  },
  // Trigger on start up
  triggerOnInit: function triggerOnInit() {
    ScrollHandler.triggerElementPartlyInViewportAnimations();
    ScrollHandler.triggerElementFullyInViewportAnimations();
  },
  // Trigger scroll functions with throttle (preferred)
  triggerThrottle: function triggerThrottle() {
    // console.log('Throttled scroll');
    ScrollHandler.triggerElementFullyInViewportAnimations();
  },
  // Trigger scroll on debounce
  triggerDebounce: function triggerDebounce() {// console.log('Debounce scroll');
  },
  // Trigger scroll on the flight
  triggerSmooth: function triggerSmooth() {
    // console.log('Smooth scroll');
    ScrollHandler.detectScrollDirection();
    ScrollHandler.toggleStickyNavigation();
  },
  // Detect if part of a given element is visible in the viewport
  // El must be a node element
  detectIfElementIsPartlyInViewport: function detectIfElementIsPartlyInViewport(el) {
    if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(el)) {
      var rect = el.getBoundingClientRect(); // DOMRect { x: 8, y: 8, width: 100, height: 100, top: 8, right: 108, bottom: 108, left: 8 }

      var windowHeight = window.innerHeight || document.documentElement.clientHeight;
      var windowWidth = window.innerWidth || document.documentElement.clientWidth;
      var verticalInView = rect.top <= windowHeight && rect.top + rect.height >= 0;
      var horizontalInView = rect.left <= windowWidth && rect.left + rect.width >= 0;
      return verticalInView && horizontalInView;
    }
  },
  // Detect if a given element is fully visible in the viewport
  // El must be a node element
  detectIfElementIsFullyInViewport: function detectIfElementIsFullyInViewport(el) {
    if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(el)) {
      var rect = el.getBoundingClientRect();
      return rect.top >= 0 && rect.bottom <= window.innerHeight;
    }
  },
  detectScrollDirection: function detectScrollDirection() {
    var scrollTopPosition = window.pageYOffset || document.documentElement.scrollTop; // Credits: "https://github.com/qeremy/so/blob/master/so.dom.js#L426"

    if (scrollTopPosition >= ScrollHandler.lastScrollTopPosition) {
      ScrollHandler.scrollDirectionDown = true;
      ScrollHandler.scrollDirectionUp = false;
    } else {
      ScrollHandler.scrollDirectionDown = false;
      ScrollHandler.scrollDirectionUp = true;
    }

    ScrollHandler.lastScrollTopPosition = scrollTopPosition;
  },
  // Trigger animation on elements that have 'element-not-in-viewport' and that are partly in the viewport
  // These animation can only be triggered once, if you want more then that you should write an specific function for this
  triggerElementPartlyInViewportAnimations: function triggerElementPartlyInViewportAnimations() {
    var elements = document.querySelectorAll('.element-not-in-viewport');
    var elementsLength = elements.length;

    for (var e = 0; e < elementsLength; e++) {
      var element = elements[e];

      if (ScrollHandler.detectIfElementIsPartlyInViewport(element)) {
        element.classList.remove('element-not-viewport');
      }
    }
  },
  // Trigger animation on elements that have 'whole-element-not-in-viewport' and that are fully in the viewport
  // These animation can only be triggered once, if you want more then that you should write an specific function for this
  triggerElementFullyInViewportAnimations: function triggerElementFullyInViewportAnimations() {
    var elements = document.querySelectorAll('.whole-element-not-in-viewport');
    var elementsLength = elements.length;

    for (var e = 0; e < elementsLength; e++) {
      var element = elements[e];

      if (ScrollHandler.detectIfElementIsPartlyInViewport(element)) {
        element.classList.remove('whole-element-not-in-viewport');
      }
    }
  },
  // ------------------------------ CUSTOM SCROLL HANDLERS ------------------------------------
  // Hide or show sticky navigation when header isn't visible
  toggleStickyNavigation: function toggleStickyNavigation() {
    var mainNavigation = document.querySelector('body >header');
    var stickyNavigation = document.getElementById('sticky-navigation');

    if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(stickyNavigation) && Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(mainNavigation)) {
      // Show sticky navigation
      if (!ScrollHandler.detectIfElementIsFullyInViewport(mainNavigation) && ScrollHandler.scrollDirectionUp) {
        stickyNavigation.classList.add('active');
      } // Hide sticky navigation


      if (ScrollHandler.scrollDirectionDown || ScrollHandler.detectIfElementIsPartlyInViewport(mainNavigation)) {
        stickyNavigation.classList.remove('active');
      }
    }
  }
};
/* harmony default export */ __webpack_exports__["default"] = (ScrollHandler);

/***/ }),

/***/ "./resources/assets/js/site/scrollToHandler.js":
/*!*****************************************************!*\
  !*** ./resources/assets/js/site/scrollToHandler.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* ==========================================================================
    Scroll To Click handler
 ========================================================================== */
var ScrollToHandler = {
  // Animation settings
  offset: 60,
  //pixel
  duration: 1400,
  //ms
  // Animation variables
  body: null,
  start: 0,
  change: 0,
  currentTime: 0,
  allowAnimation: false,
  scrollToAnimation: null,
  // Watch the EasingFunction helper for the available methods
  easing: 'easeInOutQuad',
  init: function init() {
    var anchorLinks = document.querySelectorAll('.scroll-to-target');
    var anchorLinksAmount = anchorLinks.length;

    for (var i = 0; i < anchorLinksAmount; i++) {
      var anchorLink = anchorLinks[i];
      anchorLink.addEventListener('click', function (event) {
        ScrollToHandler.prepareScrollTo(this.getAttribute('href'));
        event.preventDefault();
      });
    }
  },

  /**
   * Prepare the Handler for the animation
   */
  prepareScrollTo: function prepareScrollTo(elementId) {
    var allowAbort = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
    // Get the scroll to element
    elementId = elementId.substr(elementId.indexOf('#') + 1);
    var scrollToElement = document.getElementById(elementId);
    var scrollToElementPosition = scrollToElement.getBoundingClientRect(); // Reset or define the Handler variables

    ScrollToHandler.body = document.documentElement;
    ScrollToHandler.start = Math.max(ScrollToHandler.body.scrollTop, document.body.scrollTop, window.pageYOffset); //Use Math.max because safari doesn't support document.documentElement.scrollTop

    ScrollToHandler.change = scrollToElementPosition.top + ScrollToHandler.start - ScrollToHandler.start - ScrollToHandler.offset;
    ScrollToHandler.startTime = 'now' in window.performance ? performance.now() : new Date().getTime();
    ScrollToHandler.allowAnimation = true;
    var scrollToAnimation = requestAnimationFrame(ScrollToHandler.animateScroll);

    if (allowAbort) {
      // Stop on scroll
      window.addEventListener('mousedown', ScrollToHandler.abortScrollAnimation);
      window.addEventListener('wheel', ScrollToHandler.abortScrollAnimation);
      window.addEventListener('DOMMouseScroll', ScrollToHandler.abortScrollAnimation);
      window.addEventListener('mousewheel', ScrollToHandler.abortScrollAnimation);
      window.addEventListener('keyup', ScrollToHandler.abortScrollAnimation);
      window.addEventListener('touchmove', ScrollToHandler.abortScrollAnimation);
    }
  },

  /*
   * Animate the scroll position
   */
  animateScroll: function animateScroll(timestamp) {
    // Calculate progress from 0 - 1
    var progress = Math.min(1, (timestamp - ScrollToHandler.startTime) / ScrollToHandler.duration);
    if (progress < 0) progress = 0; // Convert progress with easing function

    progress = EasingFunctions[ScrollToHandler.easing](progress);
    var newScrollTop = ScrollToHandler.start + ScrollToHandler.change * progress;
    ScrollToHandler.body.scrollTop = newScrollTop;
    if (ScrollToHandler.body.scrollTop === 0) document.body.scrollTop = newScrollTop; // Safari doesn't support so if ScrollToHandler.body.scrollTop is 0 force the scroll position through document.body.scrollTop

    if (progress < 1 && ScrollToHandler.allowAnimation) {
      var scrollToAnimation = requestAnimationFrame(ScrollToHandler.animateScroll);
    }
  },

  /*
   * Abort the scroll animation
   */
  abortScrollAnimation: function abortScrollAnimation(event) {
    ScrollToHandler.allowAnimation = false;
    cancelAnimationFrame(ScrollToHandler.scrollToAnimation);
  }
};
/* harmony default export */ __webpack_exports__["default"] = (ScrollToHandler);

/***/ }),

/***/ "./resources/assets/js/site/searchBarHandler.js":
/*!******************************************************!*\
  !*** ./resources/assets/js/site/searchBarHandler.js ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* ==========================================================================
    SearchBar handler
 ========================================================================== */
var SearchBarHandler = {
  init: function init() {
    var searchBars = document.querySelectorAll('.search-bar');
    var searchBarsLength = searchBars.length;

    var _loop = function _loop(i) {
      var searchBar = searchBars[i];
      var searchBarForm = searchBar.querySelector('form');
      var searchBarInput = searchBar.querySelector('.search-input');
      searchBar.querySelector('.icon').addEventListener('click', function () {
        searchBarForm.submit();
      });
    };

    for (var i = 0; i < searchBarsLength; i++) {
      _loop(i);
    }
  }
};
/* harmony default export */ __webpack_exports__["default"] = (SearchBarHandler);

/***/ }),

/***/ "./resources/assets/js/site/searchHandler.js":
/*!***************************************************!*\
  !*** ./resources/assets/js/site/searchHandler.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return SearchHandler; });
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }

var SearchHandler = /*#__PURE__*/function () {
  function SearchHandler(searchUrl) {
    _classCallCheck(this, SearchHandler);

    console.debug('searchHandler initialized with searchUrl: ' + searchUrl);
    this.searchUrl = searchUrl;
  }

  _createClass(SearchHandler, [{
    key: "search",
    value: function search(term) {
      var page = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
      var amount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
      if (term === "") return;
      self = this;
      $.ajax({
        type: "GET",
        url: this.searchUrl,
        data: {
          page: page,
          amount: amount,
          term: term
        },
        success: function success(response) {
          self.processSearchResponse(response);
        },
        error: function error() {
          console.log("An error occured while searching");
        },
        headers: {
          'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
        },
        dataType: 'json'
      });
    }
  }, {
    key: "processSearchResponse",
    value: function processSearchResponse(response) {
      if (!searchHandler.validateSearchResponse(response)) return;
      console.log(response);
    }
  }], [{
    key: "validateSearchResponse",
    value: function validateSearchResponse(response) {
      if (response.hasOwnProperty('data') && response.hasOwnProperty('meta')) return true;
      console.error('Search response was not valid');
      console.log(response);
      return false;
    }
  }]);

  return SearchHandler;
}();



/***/ }),

/***/ "./resources/assets/js/site/shareButtonsHandler.js":
/*!*********************************************************!*\
  !*** ./resources/assets/js/site/shareButtonsHandler.js ***!
  \*********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _global_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global/helpers */ "./resources/assets/js/global/helpers.js");

/* ==========================================================================
    Share buttons handler
 ========================================================================== */

var ShareButtonsHandler = {
  shareButtonsElement: null,
  shareMessageElement: null,
  shareMessage: null,
  init: function init() {
    // Get the youtube players containers
    ShareButtonsHandler.shareButtonsElement = document.getElementById('shareButtons');
    ShareButtonsHandler.shareMessageElement = document.getElementById('shareButtonData');

    if (Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(ShareButtonsHandler.shareButtonsElement) && Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["isset"])(ShareButtonsHandler.shareMessageElement)) {
      ShareButtonsHandler.convertShareMessageToObject();
      var buttons = ShareButtonsHandler.shareButtonsElement.querySelectorAll('.social-media-button');
      var buttonsLength = buttons.length;

      var _loop = function _loop(i) {
        var button = buttons[i];
        button.addEventListener('click', function () {
          var social = button.getAttribute('data-social');
          var functionName = 'click' + Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["capitalizeFirstLetter"])(social) + 'Button';

          if (typeof ShareButtonsHandler[functionName] === 'function') {
            ShareButtonsHandler[functionName]();
          } else {
            console.log('Method not build yet: ' + functionName);
          }
        });
      };

      for (var i = 0; i < buttonsLength; i++) {
        _loop(i);
      }
    }
  },
  convertShareMessageToObject: function convertShareMessageToObject() {
    var messageObject = {};

    for (var i = 0, attributes = ShareButtonsHandler.shareMessageElement.attributes, attributesLength = attributes.length; i < attributesLength; i++) {
      var attribute = attributes[i];
      var attributeName = attribute.name;
      attributeName = attributeName.replace(/data-/g, '');
      attributeName = Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["snakeToCamel"])(attributeName);
      messageObject[attributeName] = attribute.value;
    }

    ShareButtonsHandler.shareMessage = messageObject;
  },
  clickFacebookButton: function clickFacebookButton() {
    FB.ui({
      method: 'share',
      mobile_iframe: true,
      href: ShareButtonsHandler.shareMessage.url
    }, function (response) {});
  },
  clickTwitterButton: function clickTwitterButton() {
    window.open('https://twitter.com/intent/tweet?text=' + ShareButtonsHandler.shareMessage.encodeName + '&url=' + ShareButtonsHandler.shareMessage.encodeUrl, 'newwindow', 'width=500, height=600');
  },
  clickLinkedinButton: function clickLinkedinButton() {
    window.open('https://www.linkedin.com/shareArticle?mini=true&url=' + ShareButtonsHandler.shareMessage.encodeUrl + '&title=' + ShareButtonsHandler.shareMessage.encodeName + '&summary=' + ShareButtonsHandler.shareMessage.encodeSummary, 'newwindow', 'width=500, height=600');
  },
  clickMailButton: function clickMailButton() {
    window.open('mailto:?subject=' + ShareButtonsHandler.shareMessage.name + '&body=' + ShareButtonsHandler.shareMessage.url, '_self');
  },
  clickLinkButton: function clickLinkButton() {
    ShareButtonsHandler.shareMessageElement.select();
    document.execCommand("copy");
    var flashMessage = ShareButtonsHandler.shareButtonsElement.querySelector('.social-media-button[data-social="link"] .flash-message');
    flashMessage.classList.add('clicked');
    setTimeout(function () {
      flashMessage.classList.remove('clicked');
    }, 2000);
  }
};
/* harmony default export */ __webpack_exports__["default"] = (ShareButtonsHandler);

/***/ }),

/***/ "./resources/assets/js/site/sliderHandler.js":
/*!***************************************************!*\
  !*** ./resources/assets/js/site/sliderHandler.js ***!
  \***************************************************/
/*! exports provided: SliderSetting, Slider */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SliderSetting", function() { return SliderSetting; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Slider", function() { return Slider; });
/* harmony import */ var _lib_hammer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../lib/hammer */ "./resources/assets/js/lib/hammer.js");
/* harmony import */ var _lib_hammer__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_lib_hammer__WEBPACK_IMPORTED_MODULE_0__);
/**
 * Created by Pascal on 06/12/17.
 */

/* Example

const headerImageSliderSetting = new SliderSetting({
    sliderId: 'header-image-slider',
    slideQuery: '#header-image-slider .placeholder figure',
    dots: '#header-image-slider .slider-navigation-labels .navigation span',
    captions: '#header-image-slider .slider-navigation-labels .caption p',
    autoSlider: true,
    sliderInterval: 4000
});
headerImageSliderSetting = headerImageSliderSetting.prepareParameters();

const headerImageSlider = new Slider(headerImageSliderSetting).init();

 */

var imageSliders = [];
var imageSliderContainers = document.querySelectorAll('.image-slider');
var imageSliderContainersLength = imageSliderContainers.length;

for (var i = 0; i < imageSliderContainersLength; i++) {
  var imageSlider = imageSliderContainers[i];
  var imageSliderId = imageSlider.getAttribute('id');

  if (imageSliderId !== null) {
    var imageSliderSetting = new SliderSetting({
      sliderId: imageSliderId,
      slideQuery: '#' + imageSliderId + ' .placeholder figure',
      navigationButtons: '#' + imageSliderId + ' .placeholder .controllers .nav-item',
      autoSlider: true,
      sliderInterval: 6000
    });
    imageSliders.push(new Slider(imageSliderSetting.prepareParameters()).init());
  } else console.log('An image slider has no id...');
}

function SliderSetting(settingsObject) {
  var self = this;
  this.sliderId = '';
  this.definedPreviousNext = true;
  this.autoSlider = false;
  this.sliderInterval = 4000;
  this.navigationButtons = '';
  this.dots = '';
  this.captions = '';
  this.slideQuery = '';

  this.setSliderId = function (string) {
    this.sliderId = string;
    return this;
  };

  this.setDefinedPreviousNext = function (_boolean) {
    this.definedPreviousNext = _boolean;
    return this;
  };

  this.setAutoSlider = function (_boolean2) {
    this.autoSlider = _boolean2;
    return this;
  };

  this.setSliderInterval = function (integer) {
    this.sliderInterval = integer;
    return this;
  };

  this.setSlideQuery = function (string) {
    this.slideQuery = string;
    return this;
  };

  this.setNavigationButtons = function (string) {
    this.navigationButtons = string;
    return this;
  };

  this.setDots = function (string) {
    this.dots = string;
    return this;
  };

  this.setCaptions = function (string) {
    this.captions = string;
    return this;
  };

  this.getSliderId = function () {
    return this.sliderId;
  };

  this.getDefinedPreviousNext = function () {
    return this.definedPreviousNext;
  };

  this.getAutoSlider = function () {
    return this.autoSlider;
  };

  this.getSliderInterval = function () {
    return this.sliderInterval;
  };

  this.getSlideQuery = function () {
    return this.slideQuery;
  };

  this.getNavigationButtons = function () {
    return this.navigationButtons;
  };

  this.getDots = function () {
    return this.dots;
  };

  this.getCaptions = function () {
    return this.captions;
  }; // Invert setters to getters


  this.prepareParameters = function () {
    return {
      sliderId: self.getSliderId(),
      definedPreviousNext: self.getDefinedPreviousNext(),
      autoSlider: self.getAutoSlider(),
      sliderInterval: self.getSliderInterval(),
      navigationButtons: self.getNavigationButtons(),
      dots: self.getDots(),
      captions: self.getCaptions(),
      slideQuery: self.getSlideQuery()
    };
  }; // Mass assign settings


  this.fill = function () {
    // Object.keys(settingsObject).forEach(function (key) {
    //     self[key] = settingsObject[key];
    // });
    var settingsObjectKeys = Object.keys(settingsObject);
    var settingsObjectLength = settingsObjectKeys.length;

    for (var _i = 0; _i < settingsObjectLength; _i++) {
      var key = settingsObjectKeys[_i];
      self[key] = settingsObject[key];
    }
  };

  this.fill();
  return {
    sliderId: self.setSliderId,
    definedPreviousNext: self.setDefinedPreviousNext,
    autoSlider: self.setAutoSlider,
    sliderInterval: self.setSliderInterval,
    navigationButtons: self.setNavigationButtons,
    dots: self.setDots,
    captions: self.setCaptions,
    slideQuery: self.setSlideQuery,
    prepareParameters: self.prepareParameters
  };
}
function Slider(settings) {
  //Define Slider object
  var self = this;
  this.sliderObject = ''; //SlideParameters

  this.activeSlideId = 0;
  this.previousSlideId = 0;
  this.nextSlideId = 0;
  this.availableSlides = 1;
  this.slides = [];
  this.autoSliderInterval = null;
  this.settings = {};

  this.init = function () {
    //Append settings to self
    this.settings = settings; //Assign needed elements and calculations

    this.sliderObject = document.getElementById(this.settings.sliderId);
    this.slides = document.querySelectorAll(this.settings.slideQuery);
    this.availableSlides = this.slides.length;
    this.activeSlideId = 0; //Define previous and next if we want to use those

    if (self.settings.definedPreviousNext) this.setPreviousAndNextSlide(); // Set active slide (and possible previous and next classes)

    this.setSlide(); // Swipe interaction

    var swipeGestures = new _lib_hammer__WEBPACK_IMPORTED_MODULE_0___default.a(this.sliderObject);
    swipeGestures.on('swipeleft', function () {
      self.resetAutoSlider();
      self.nextSlide();
      self.setSlide();
    });
    swipeGestures.on('swiperight', function () {
      self.resetAutoSlider();
      self.previousSlide();
      self.setSlide();
    });
    window.addEventListener("keydown", function (event) {
      if (event.defaultPrevented) {
        return; // Do nothing if the event was already processed
      }

      switch (event.key) {
        case "Left": // IE/Edge specific value

        case "ArrowLeft":
          self.resetAutoSlider();
          self.previousSlide();
          self.setSlide();
          break;

        case "Right": // IE/Edge specific value

        case "ArrowRight":
          self.resetAutoSlider();
          self.nextSlide();
          self.setSlide();
          break;

        default:
          return;
        // Quit when this doesn't handle the key event.
      } // Cancel the default action to avoid it being handled twice


      event.preventDefault();
    }, true);

    if (this.settings.navigationButtons !== '') {
      // Click interaction
      var navigationButtons = document.querySelectorAll(this.settings.navigationButtons);
      var navigationButtonsLength = navigationButtons.length;

      for (var _i2 = 0; _i2 < navigationButtonsLength; _i2++) {
        var navigationButton = navigationButtons[_i2];
        navigationButton.addEventListener('click', function () {
          self.clickNavigationButton(this);
        });
      }
    }

    if (this.settings.dots !== '') {
      // Click interaction
      var dots = document.querySelectorAll(this.settings.dots);
      var dotsLength = dots.length; // console.log(this.settings.dots);
      // console.log(dots);

      for (var _i3 = 0; _i3 < dotsLength; _i3++) {
        var dot = dots[_i3]; // console.log('hier');

        dot.addEventListener('click', function () {
          self.clickDot(this);
        });
      }
    }

    self.autoSlider();
  };

  this.autoSlider = function () {
    if (this.autoSliderInterval !== null) clearInterval(this.autoSliderInterval);

    if (this.settings.autoSlider && Number.isInteger(this.settings.sliderInterval)) {
      this.autoSliderInterval = setInterval(function () {
        self.nextSlide();
        self.setSlide();
      }, this.settings.sliderInterval);
    }
  };

  this.resetAutoSlider = self.autoSlider;

  this.nextSlide = function () {
    this.activeSlideId++;
    if (this.activeSlideId >= this.availableSlides) this.activeSlideId = 0;
    if (self.settings.definedPreviousNext) this.setPreviousAndNextSlide();
  };

  this.previousSlide = function () {
    this.activeSlideId--;
    if (this.activeSlideId < 0) this.activeSlideId = this.availableSlides - 1;
    if (self.settings.definedPreviousNext) this.setPreviousAndNextSlide();
  };

  this.setPreviousAndNextSlide = function () {
    this.nextSlideId = this.activeSlideId + 1;
    if (this.nextSlideId >= this.availableSlides) this.nextSlideId = 0;
    this.previousSlideId = this.activeSlideId - 1;
    if (this.previousSlideId < 0) this.previousSlideId = this.availableSlides - 1;
  };

  this.setSlide = function () {
    // Loop through the form elements
    var slidesLength = self.slides.length;

    for (var _i4 = 0; _i4 < slidesLength; _i4++) {
      var slide = self.slides[_i4]; // Convert data set attribute to desired type

      var slideOrder = parseInt(slide.getAttribute('data-order')); // Remove and set active for all slides

      if (slideOrder !== self.activeSlideId) slide.classList.remove('active');else slide.classList.add('active'); // If we use the previous and next, also set those classes

      if (self.settings.definedPreviousNext) {
        if (slideOrder !== self.previousSlideId) slide.classList.remove('previous');else slide.classList.add('previous');
        if (slideOrder !== self.nextSlideId) slide.classList.remove('next');else slide.classList.add('next');
      }
    }

    if (self.settings.dots !== '') {
      self.setActiveDot();
    }

    if (self.settings.captions !== '') {
      self.setActiveCaption();
    }
  };

  this.clickNavigationButton = function (navButton) {
    self.activeSlideId = parseInt(navButton.getAttribute('data-order'));
    if (self.settings.definedPreviousNext) self.setPreviousAndNextSlide();
    self.setSlide();
    var next = document.querySelector(self.settings.navigationButtons + '.next');
    var previous = document.querySelector(self.settings.navigationButtons + '.previous');
    next.setAttribute('data-order', self.nextSlideId);
    previous.setAttribute('data-order', self.previousSlideId);
    self.resetAutoSlider(); // next.querySelector('p').innerHTML = self.slides[self.nextSlideId].dataset.name;
    // previous.querySelector('p').innerHTML = self.slides[self.previousSlideId].dataset.name;
  };

  this.clickDot = function (clickedDot) {
    self.activeSlideId = parseInt(clickedDot.getAttribute('data-order'));
    self.setSlide();
    self.resetAutoSlider();
  };

  this.setActiveDot = function () {
    var dots = document.querySelectorAll(this.settings.dots);
    var dotsLength = dots.length;

    for (var _i5 = 0; _i5 < dotsLength; _i5++) {
      var dot = dots[_i5];
      var dotOrder = parseInt(dot.getAttribute('data-order'));
      if (dotOrder !== self.activeSlideId) dot.classList.remove('active');else dot.classList.add('active');
    }
  };

  this.setActiveCaption = function () {
    var captions = document.querySelectorAll(this.settings.captions);
    var captionsLength = captions.length;

    for (var _i6 = 0; _i6 < captionsLength; _i6++) {
      var caption = captions[_i6];
      var captionOrder = parseInt(caption.getAttribute('data-order'));
      if (captionOrder !== self.activeSlideId) caption.classList.remove('active');else caption.classList.add('active');
    }
  };
}

/***/ }),

/***/ "./resources/assets/js/site/youtubeHandler.js":
/*!****************************************************!*\
  !*** ./resources/assets/js/site/youtubeHandler.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _global_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global/helpers */ "./resources/assets/js/global/helpers.js");
/* ==========================================================================
    Youtube handler
 ========================================================================== */

var YoutubeHandler = {
  youtubeClass: '.youtube-player',
  players: [],
  init: function init() {
    // Get the youtube players containers
    var youtubePlayers = document.querySelectorAll(YoutubeHandler.youtubeClass);
    var youtubePlayersAmount = youtubePlayers.length;

    for (var i = 0; i < youtubePlayersAmount; i++) {
      var youtubePlayer = youtubePlayers[i];
      var youtubePlayerId = youtubePlayer.getAttribute('id');

      if (youtubePlayerId !== null) {
        // Strip the necessary data from the html and create objects from it
        var youtubeElement = {
          id: youtubePlayer.getAttribute('id'),
          link: youtubePlayer.getAttribute('data-youtube-link'),
          autoPlay: parseInt(youtubePlayer.getAttribute('data-auto-play'))
        };
        YoutubeHandler.players.push(youtubeElement);
      } else {
        console.log("Element not include because there isn't a id on the player");
        console.log(youtubePlayer);
      }
    }

    if (youtubePlayersAmount >= 1) YoutubeHandler.initYoutube();
  },

  /**
   * Check if external script is loaded
   *
   */
  initYoutube: function initYoutube() {
    // See if YT variable exists
    if (typeof YT == 'undefined' || typeof YT.Player == 'undefined') {
      // Setup API ready function
      window.onYouTubePlayerAPIReady = function () {
        YoutubeHandler.loadPlayers();
      }; // Load external script


      Object(_global_helpers__WEBPACK_IMPORTED_MODULE_0__["getScript"])('https://www.youtube.com/iframe_api'); // If YT already exists load player
    } else {
      YoutubeHandler.loadPlayers();
    }
  },

  /**
   * Create the Youtube player(s) with parameters
   * And rewrite the players to key them by the element id
   *
   */
  loadPlayers: function loadPlayers() {
    var players = [];
    var youtubePlayersAmount = YoutubeHandler.players.length;

    for (var i = 0; i < youtubePlayersAmount; i++) {
      var youtubePlayer = YoutubeHandler.players[i]; // Load player

      youtubePlayer.player = new YT.Player(youtubePlayer.id, {
        height: 200,
        width: 200,
        videoId: youtubePlayer.link,
        host: 'https://www.youtube-nocookie.com',
        playerVars: {
          modestbranding: 0,
          showinfo: 0,
          rel: 0,
          disablekb: 1,
          autoplay: youtubePlayer.autoPlay
        },
        events: {
          // 'onReady': YoutubeHandler.onReady,
          'onStateChange': YoutubeHandler.onStateChange
        }
      });
      players[youtubePlayer.id] = youtubePlayer;
    }

    YoutubeHandler.players = players;
  },

  /**
   * When player is ready to play
   */
  onReady: function onReady(event) {
    var playerContainerId = event.target.getIframe().getAttribute('id');
    var player = YoutubeHandler.players[playerContainerId].player; // Show video
    // setTimeout(function(){ $('#' + playerContainerId).stop().animate({ opacity: 1 },1000) },800);
    // If not on tablet or mobile, play on high quality
    // player.mute();
    // player.playVideo();
    // player.setPlaybackQuality('hd1080');
  },

  /**
   * Listener for Youtube state change
   */
  onStateChange: function onStateChange(event) {
    var playerContainerId = event.target.getIframe().getAttribute('id');
    var player = YoutubeHandler.players[playerContainerId].player;
    var videoState = event.data; // Loop video

    if (event.data === YT.PlayerState.ENDED) {
      player.playVideo();
    }
  }
};
/* harmony default export */ __webpack_exports__["default"] = (YoutubeHandler);

/***/ }),

/***/ "./resources/assets/sass/kms/styles.sass":
/*!***********************************************!*\
  !*** ./resources/assets/sass/kms/styles.sass ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),

/***/ "./resources/assets/sass/site/style.sass":
/*!***********************************************!*\
  !*** ./resources/assets/sass/site/style.sass ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),

/***/ 0:
/*!******************************************************************************************************************************************************************************************************************************************!*\
  !*** multi ./resources/assets/js/global/polyfills/promise.js ./resources/assets/js/global/polyfills/symbol-es6.min.js ./resources/assets/js/site/app.js ./resources/assets/sass/site/style.sass ./resources/assets/sass/kms/styles.sass ***!
  \******************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! /Users/pascallemmen/Development/Netwerk-Brabant/resources/assets/js/global/polyfills/promise.js */"./resources/assets/js/global/polyfills/promise.js");
__webpack_require__(/*! /Users/pascallemmen/Development/Netwerk-Brabant/resources/assets/js/global/polyfills/symbol-es6.min.js */"./resources/assets/js/global/polyfills/symbol-es6.min.js");
__webpack_require__(/*! /Users/pascallemmen/Development/Netwerk-Brabant/resources/assets/js/site/app.js */"./resources/assets/js/site/app.js");
__webpack_require__(/*! /Users/pascallemmen/Development/Netwerk-Brabant/resources/assets/sass/site/style.sass */"./resources/assets/sass/site/style.sass");
module.exports = __webpack_require__(/*! /Users/pascallemmen/Development/Netwerk-Brabant/resources/assets/sass/kms/styles.sass */"./resources/assets/sass/kms/styles.sass");


/***/ })

/******/ });