/*!
 * /**
 * * @name JSON Editor
 * * @description JSON Schema Based Editor
 * * This library is the continuation of jdorn's great work (see also https://github.com/jdorn/json-editor/issues/800)
 * * @version "2.6.1"
 * * @author Jeremy Dorn
 * * @see https://github.com/jdorn/json-editor/
 * * @see https://github.com/json-editor/json-editor
 * * @license MIT
 * * @example see README.md and docs/ for requirements, examples and usage info
 * * /
 */
(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory();
	else if(typeof define === 'function' && define.amd)
		define([], factory);
	else {
		var a = factory();
		for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
	}
})(window, function() {
return /******/ (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 = "/dist/";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = "./src/core.js");
/******/ })
/************************************************************************/
/******/ ({

/***/ "./node_modules/core-js/internals/a-function.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/internals/a-function.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = function (it) {
  if (typeof it != 'function') {
    throw TypeError(String(it) + ' is not a function');
  } return it;
};


/***/ }),

/***/ "./node_modules/core-js/internals/a-possible-prototype.js":
/*!****************************************************************!*\
  !*** ./node_modules/core-js/internals/a-possible-prototype.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");

module.exports = function (it) {
  if (!isObject(it) && it !== null) {
    throw TypeError("Can't set " + String(it) + ' as a prototype');
  } return it;
};


/***/ }),

/***/ "./node_modules/core-js/internals/add-to-unscopables.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/internals/add-to-unscopables.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");

var UNSCOPABLES = wellKnownSymbol('unscopables');
var ArrayPrototype = Array.prototype;

// Array.prototype[@@unscopables]
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
if (ArrayPrototype[UNSCOPABLES] == undefined) {
  definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
    configurable: true,
    value: create(null)
  });
}

// add a key to Array.prototype[@@unscopables]
module.exports = function (key) {
  ArrayPrototype[UNSCOPABLES][key] = true;
};


/***/ }),

/***/ "./node_modules/core-js/internals/advance-string-index.js":
/*!****************************************************************!*\
  !*** ./node_modules/core-js/internals/advance-string-index.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var charAt = __webpack_require__(/*! ../internals/string-multibyte */ "./node_modules/core-js/internals/string-multibyte.js").charAt;

// `AdvanceStringIndex` abstract operation
// https://tc39.es/ecma262/#sec-advancestringindex
module.exports = function (S, index, unicode) {
  return index + (unicode ? charAt(S, index).length : 1);
};


/***/ }),

/***/ "./node_modules/core-js/internals/an-object.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/internals/an-object.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");

module.exports = function (it) {
  if (!isObject(it)) {
    throw TypeError(String(it) + ' is not an object');
  } return it;
};


/***/ }),

/***/ "./node_modules/core-js/internals/array-for-each.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/internals/array-for-each.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $forEach = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").forEach;
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");

var STRICT_METHOD = arrayMethodIsStrict('forEach');

// `Array.prototype.forEach` method implementation
// https://tc39.es/ecma262/#sec-array.prototype.foreach
module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
  return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
// eslint-disable-next-line es/no-array-prototype-foreach -- safe
} : [].forEach;


/***/ }),

/***/ "./node_modules/core-js/internals/array-from.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/internals/array-from.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
var callWithSafeIterationClosing = __webpack_require__(/*! ../internals/call-with-safe-iteration-closing */ "./node_modules/core-js/internals/call-with-safe-iteration-closing.js");
var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ "./node_modules/core-js/internals/is-array-iterator-method.js");
var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "./node_modules/core-js/internals/get-iterator-method.js");

// `Array.from` method implementation
// https://tc39.es/ecma262/#sec-array.from
module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
  var O = toObject(arrayLike);
  var C = typeof this == 'function' ? this : Array;
  var argumentsLength = arguments.length;
  var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
  var mapping = mapfn !== undefined;
  var iteratorMethod = getIteratorMethod(O);
  var index = 0;
  var length, result, step, iterator, next, value;
  if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);
  // if the target is not iterable or it's an array with the default iterator - use a simple case
  if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
    iterator = iteratorMethod.call(O);
    next = iterator.next;
    result = new C();
    for (;!(step = next.call(iterator)).done; index++) {
      value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
      createProperty(result, index, value);
    }
  } else {
    length = toLength(O.length);
    result = new C(length);
    for (;length > index; index++) {
      value = mapping ? mapfn(O[index], index) : O[index];
      createProperty(result, index, value);
    }
  }
  result.length = index;
  return result;
};


/***/ }),

/***/ "./node_modules/core-js/internals/array-includes.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/internals/array-includes.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "./node_modules/core-js/internals/to-absolute-index.js");

// `Array.prototype.{ indexOf, includes }` methods implementation
var createMethod = function (IS_INCLUDES) {
  return function ($this, el, fromIndex) {
    var O = toIndexedObject($this);
    var length = toLength(O.length);
    var index = toAbsoluteIndex(fromIndex, length);
    var value;
    // Array#includes uses SameValueZero equality algorithm
    // eslint-disable-next-line no-self-compare -- NaN check
    if (IS_INCLUDES && el != el) while (length > index) {
      value = O[index++];
      // eslint-disable-next-line no-self-compare -- NaN check
      if (value != value) return true;
    // Array#indexOf ignores holes, Array#includes - not
    } else for (;length > index; index++) {
      if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
    } return !IS_INCLUDES && -1;
  };
};

module.exports = {
  // `Array.prototype.includes` method
  // https://tc39.es/ecma262/#sec-array.prototype.includes
  includes: createMethod(true),
  // `Array.prototype.indexOf` method
  // https://tc39.es/ecma262/#sec-array.prototype.indexof
  indexOf: createMethod(false)
};


/***/ }),

/***/ "./node_modules/core-js/internals/array-iteration.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/internals/array-iteration.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/core-js/internals/indexed-object.js");
var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "./node_modules/core-js/internals/array-species-create.js");

var push = [].push;

// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
var createMethod = function (TYPE) {
  var IS_MAP = TYPE == 1;
  var IS_FILTER = TYPE == 2;
  var IS_SOME = TYPE == 3;
  var IS_EVERY = TYPE == 4;
  var IS_FIND_INDEX = TYPE == 6;
  var IS_FILTER_OUT = TYPE == 7;
  var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  return function ($this, callbackfn, that, specificCreate) {
    var O = toObject($this);
    var self = IndexedObject(O);
    var boundFunction = bind(callbackfn, that, 3);
    var length = toLength(self.length);
    var index = 0;
    var create = specificCreate || arraySpeciesCreate;
    var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
    var value, result;
    for (;length > index; index++) if (NO_HOLES || index in self) {
      value = self[index];
      result = boundFunction(value, index, O);
      if (TYPE) {
        if (IS_MAP) target[index] = result; // map
        else if (result) switch (TYPE) {
          case 3: return true;              // some
          case 5: return value;             // find
          case 6: return index;             // findIndex
          case 2: push.call(target, value); // filter
        } else switch (TYPE) {
          case 4: return false;             // every
          case 7: push.call(target, value); // filterOut
        }
      }
    }
    return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  };
};

module.exports = {
  // `Array.prototype.forEach` method
  // https://tc39.es/ecma262/#sec-array.prototype.foreach
  forEach: createMethod(0),
  // `Array.prototype.map` method
  // https://tc39.es/ecma262/#sec-array.prototype.map
  map: createMethod(1),
  // `Array.prototype.filter` method
  // https://tc39.es/ecma262/#sec-array.prototype.filter
  filter: createMethod(2),
  // `Array.prototype.some` method
  // https://tc39.es/ecma262/#sec-array.prototype.some
  some: createMethod(3),
  // `Array.prototype.every` method
  // https://tc39.es/ecma262/#sec-array.prototype.every
  every: createMethod(4),
  // `Array.prototype.find` method
  // https://tc39.es/ecma262/#sec-array.prototype.find
  find: createMethod(5),
  // `Array.prototype.findIndex` method
  // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  findIndex: createMethod(6),
  // `Array.prototype.filterOut` method
  // https://github.com/tc39/proposal-array-filtering
  filterOut: createMethod(7)
};


/***/ }),

/***/ "./node_modules/core-js/internals/array-method-has-species-support.js":
/*!****************************************************************************!*\
  !*** ./node_modules/core-js/internals/array-method-has-species-support.js ***!
  \****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");

var SPECIES = wellKnownSymbol('species');

module.exports = function (METHOD_NAME) {
  // We can't use this feature detection in V8 since it causes
  // deoptimization and serious performance degradation
  // https://github.com/zloirock/core-js/issues/677
  return V8_VERSION >= 51 || !fails(function () {
    var array = [];
    var constructor = array.constructor = {};
    constructor[SPECIES] = function () {
      return { foo: 1 };
    };
    return array[METHOD_NAME](Boolean).foo !== 1;
  });
};


/***/ }),

/***/ "./node_modules/core-js/internals/array-method-is-strict.js":
/*!******************************************************************!*\
  !*** ./node_modules/core-js/internals/array-method-is-strict.js ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");

module.exports = function (METHOD_NAME, argument) {
  var method = [][METHOD_NAME];
  return !!method && fails(function () {
    // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
    method.call(null, argument || function () { throw 1; }, 1);
  });
};


/***/ }),

/***/ "./node_modules/core-js/internals/array-reduce.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/internals/array-reduce.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/core-js/internals/indexed-object.js");
var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");

// `Array.prototype.{ reduce, reduceRight }` methods implementation
var createMethod = function (IS_RIGHT) {
  return function (that, callbackfn, argumentsLength, memo) {
    aFunction(callbackfn);
    var O = toObject(that);
    var self = IndexedObject(O);
    var length = toLength(O.length);
    var index = IS_RIGHT ? length - 1 : 0;
    var i = IS_RIGHT ? -1 : 1;
    if (argumentsLength < 2) while (true) {
      if (index in self) {
        memo = self[index];
        index += i;
        break;
      }
      index += i;
      if (IS_RIGHT ? index < 0 : length <= index) {
        throw TypeError('Reduce of empty array with no initial value');
      }
    }
    for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
      memo = callbackfn(memo, self[index], index, O);
    }
    return memo;
  };
};

module.exports = {
  // `Array.prototype.reduce` method
  // https://tc39.es/ecma262/#sec-array.prototype.reduce
  left: createMethod(false),
  // `Array.prototype.reduceRight` method
  // https://tc39.es/ecma262/#sec-array.prototype.reduceright
  right: createMethod(true)
};


/***/ }),

/***/ "./node_modules/core-js/internals/array-species-create.js":
/*!****************************************************************!*\
  !*** ./node_modules/core-js/internals/array-species-create.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");

var SPECIES = wellKnownSymbol('species');

// `ArraySpeciesCreate` abstract operation
// https://tc39.es/ecma262/#sec-arrayspeciescreate
module.exports = function (originalArray, length) {
  var C;
  if (isArray(originalArray)) {
    C = originalArray.constructor;
    // cross-realm fallback
    if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
    else if (isObject(C)) {
      C = C[SPECIES];
      if (C === null) C = undefined;
    }
  } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
};


/***/ }),

/***/ "./node_modules/core-js/internals/call-with-safe-iteration-closing.js":
/*!****************************************************************************!*\
  !*** ./node_modules/core-js/internals/call-with-safe-iteration-closing.js ***!
  \****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
var iteratorClose = __webpack_require__(/*! ../internals/iterator-close */ "./node_modules/core-js/internals/iterator-close.js");

// call something on iterator step with safe closing on error
module.exports = function (iterator, fn, value, ENTRIES) {
  try {
    return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
  // 7.4.6 IteratorClose(iterator, completion)
  } catch (error) {
    iteratorClose(iterator);
    throw error;
  }
};


/***/ }),

/***/ "./node_modules/core-js/internals/check-correctness-of-iteration.js":
/*!**************************************************************************!*\
  !*** ./node_modules/core-js/internals/check-correctness-of-iteration.js ***!
  \**************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");

var ITERATOR = wellKnownSymbol('iterator');
var SAFE_CLOSING = false;

try {
  var called = 0;
  var iteratorWithReturn = {
    next: function () {
      return { done: !!called++ };
    },
    'return': function () {
      SAFE_CLOSING = true;
    }
  };
  iteratorWithReturn[ITERATOR] = function () {
    return this;
  };
  // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
  Array.from(iteratorWithReturn, function () { throw 2; });
} catch (error) { /* empty */ }

module.exports = function (exec, SKIP_CLOSING) {
  if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  var ITERATION_SUPPORT = false;
  try {
    var object = {};
    object[ITERATOR] = function () {
      return {
        next: function () {
          return { done: ITERATION_SUPPORT = true };
        }
      };
    };
    exec(object);
  } catch (error) { /* empty */ }
  return ITERATION_SUPPORT;
};


/***/ }),

/***/ "./node_modules/core-js/internals/classof-raw.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/internals/classof-raw.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

var toString = {}.toString;

module.exports = function (it) {
  return toString.call(it).slice(8, -1);
};


/***/ }),

/***/ "./node_modules/core-js/internals/classof.js":
/*!***************************************************!*\
  !*** ./node_modules/core-js/internals/classof.js ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "./node_modules/core-js/internals/to-string-tag-support.js");
var classofRaw = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
// ES3 wrong here
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';

// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
  try {
    return it[key];
  } catch (error) { /* empty */ }
};

// getting tag from ES6+ `Object.prototype.toString`
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  var O, tag, result;
  return it === undefined ? 'Undefined' : it === null ? 'Null'
    // @@toStringTag case
    : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
    // builtinTag case
    : CORRECT_ARGUMENTS ? classofRaw(O)
    // ES3 arguments fallback
    : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
};


/***/ }),

/***/ "./node_modules/core-js/internals/copy-constructor-properties.js":
/*!***********************************************************************!*\
  !*** ./node_modules/core-js/internals/copy-constructor-properties.js ***!
  \***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "./node_modules/core-js/internals/own-keys.js");
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");

module.exports = function (target, source) {
  var keys = ownKeys(source);
  var defineProperty = definePropertyModule.f;
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  for (var i = 0; i < keys.length; i++) {
    var key = keys[i];
    if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  }
};


/***/ }),

/***/ "./node_modules/core-js/internals/correct-is-regexp-logic.js":
/*!*******************************************************************!*\
  !*** ./node_modules/core-js/internals/correct-is-regexp-logic.js ***!
  \*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");

var MATCH = wellKnownSymbol('match');

module.exports = function (METHOD_NAME) {
  var regexp = /./;
  try {
    '/./'[METHOD_NAME](regexp);
  } catch (error1) {
    try {
      regexp[MATCH] = false;
      return '/./'[METHOD_NAME](regexp);
    } catch (error2) { /* empty */ }
  } return false;
};


/***/ }),

/***/ "./node_modules/core-js/internals/correct-prototype-getter.js":
/*!********************************************************************!*\
  !*** ./node_modules/core-js/internals/correct-prototype-getter.js ***!
  \********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");

module.exports = !fails(function () {
  function F() { /* empty */ }
  F.prototype.constructor = null;
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
  return Object.getPrototypeOf(new F()) !== F.prototype;
});


/***/ }),

/***/ "./node_modules/core-js/internals/create-iterator-constructor.js":
/*!***********************************************************************!*\
  !*** ./node_modules/core-js/internals/create-iterator-constructor.js ***!
  \***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var IteratorPrototype = __webpack_require__(/*! ../internals/iterators-core */ "./node_modules/core-js/internals/iterators-core.js").IteratorPrototype;
var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");

var returnThis = function () { return this; };

module.exports = function (IteratorConstructor, NAME, next) {
  var TO_STRING_TAG = NAME + ' Iterator';
  IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
  setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
  Iterators[TO_STRING_TAG] = returnThis;
  return IteratorConstructor;
};


/***/ }),

/***/ "./node_modules/core-js/internals/create-non-enumerable-property.js":
/*!**************************************************************************!*\
  !*** ./node_modules/core-js/internals/create-non-enumerable-property.js ***!
  \**************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");

module.exports = DESCRIPTORS ? function (object, key, value) {
  return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
} : function (object, key, value) {
  object[key] = value;
  return object;
};


/***/ }),

/***/ "./node_modules/core-js/internals/create-property-descriptor.js":
/*!**********************************************************************!*\
  !*** ./node_modules/core-js/internals/create-property-descriptor.js ***!
  \**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = function (bitmap, value) {
  return {
    enumerable: !(bitmap & 1),
    configurable: !(bitmap & 2),
    writable: !(bitmap & 4),
    value: value
  };
};


/***/ }),

/***/ "./node_modules/core-js/internals/create-property.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/internals/create-property.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");

module.exports = function (object, key, value) {
  var propertyKey = toPrimitive(key);
  if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  else object[propertyKey] = value;
};


/***/ }),

/***/ "./node_modules/core-js/internals/define-iterator.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/internals/define-iterator.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var createIteratorConstructor = __webpack_require__(/*! ../internals/create-iterator-constructor */ "./node_modules/core-js/internals/create-iterator-constructor.js");
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/core-js/internals/object-get-prototype-of.js");
var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/core-js/internals/object-set-prototype-of.js");
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
var IteratorsCore = __webpack_require__(/*! ../internals/iterators-core */ "./node_modules/core-js/internals/iterators-core.js");

var IteratorPrototype = IteratorsCore.IteratorPrototype;
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
var ITERATOR = wellKnownSymbol('iterator');
var KEYS = 'keys';
var VALUES = 'values';
var ENTRIES = 'entries';

var returnThis = function () { return this; };

module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
  createIteratorConstructor(IteratorConstructor, NAME, next);

  var getIterationMethod = function (KIND) {
    if (KIND === DEFAULT && defaultIterator) return defaultIterator;
    if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
    switch (KIND) {
      case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
      case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
      case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
    } return function () { return new IteratorConstructor(this); };
  };

  var TO_STRING_TAG = NAME + ' Iterator';
  var INCORRECT_VALUES_NAME = false;
  var IterablePrototype = Iterable.prototype;
  var nativeIterator = IterablePrototype[ITERATOR]
    || IterablePrototype['@@iterator']
    || DEFAULT && IterablePrototype[DEFAULT];
  var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
  var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
  var CurrentIteratorPrototype, methods, KEY;

  // fix native
  if (anyNativeIterator) {
    CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
    if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
      if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
        if (setPrototypeOf) {
          setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
        } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {
          createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);
        }
      }
      // Set @@toStringTag to native iterators
      setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
      if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
    }
  }

  // fix Array#{values, @@iterator}.name in V8 / FF
  if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
    INCORRECT_VALUES_NAME = true;
    defaultIterator = function values() { return nativeIterator.call(this); };
  }

  // define iterator
  if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
    createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);
  }
  Iterators[NAME] = defaultIterator;

  // export additional methods
  if (DEFAULT) {
    methods = {
      values: getIterationMethod(VALUES),
      keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
      entries: getIterationMethod(ENTRIES)
    };
    if (FORCED) for (KEY in methods) {
      if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
        redefine(IterablePrototype, KEY, methods[KEY]);
      }
    } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
  }

  return methods;
};


/***/ }),

/***/ "./node_modules/core-js/internals/define-well-known-symbol.js":
/*!********************************************************************!*\
  !*** ./node_modules/core-js/internals/define-well-known-symbol.js ***!
  \********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var path = __webpack_require__(/*! ../internals/path */ "./node_modules/core-js/internals/path.js");
var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
var wrappedWellKnownSymbolModule = __webpack_require__(/*! ../internals/well-known-symbol-wrapped */ "./node_modules/core-js/internals/well-known-symbol-wrapped.js");
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;

module.exports = function (NAME) {
  var Symbol = path.Symbol || (path.Symbol = {});
  if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {
    value: wrappedWellKnownSymbolModule.f(NAME)
  });
};


/***/ }),

/***/ "./node_modules/core-js/internals/descriptors.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/internals/descriptors.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");

// Detect IE8's incomplete defineProperty implementation
module.exports = !fails(function () {
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
});


/***/ }),

/***/ "./node_modules/core-js/internals/document-create-element.js":
/*!*******************************************************************!*\
  !*** ./node_modules/core-js/internals/document-create-element.js ***!
  \*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");

var document = global.document;
// typeof document.createElement is 'object' in old IE
var EXISTS = isObject(document) && isObject(document.createElement);

module.exports = function (it) {
  return EXISTS ? document.createElement(it) : {};
};


/***/ }),

/***/ "./node_modules/core-js/internals/dom-iterables.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/internals/dom-iterables.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

// iterable DOM collections
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
module.exports = {
  CSSRuleList: 0,
  CSSStyleDeclaration: 0,
  CSSValueList: 0,
  ClientRectList: 0,
  DOMRectList: 0,
  DOMStringList: 0,
  DOMTokenList: 1,
  DataTransferItemList: 0,
  FileList: 0,
  HTMLAllCollection: 0,
  HTMLCollection: 0,
  HTMLFormElement: 0,
  HTMLSelectElement: 0,
  MediaList: 0,
  MimeTypeArray: 0,
  NamedNodeMap: 0,
  NodeList: 1,
  PaintRequestList: 0,
  Plugin: 0,
  PluginArray: 0,
  SVGLengthList: 0,
  SVGNumberList: 0,
  SVGPathSegList: 0,
  SVGPointList: 0,
  SVGStringList: 0,
  SVGTransformList: 0,
  SourceBufferList: 0,
  StyleSheetList: 0,
  TextTrackCueList: 0,
  TextTrackList: 0,
  TouchList: 0
};


/***/ }),

/***/ "./node_modules/core-js/internals/engine-is-node.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/internals/engine-is-node.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");

module.exports = classof(global.process) == 'process';


/***/ }),

/***/ "./node_modules/core-js/internals/engine-user-agent.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/internals/engine-user-agent.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");

module.exports = getBuiltIn('navigator', 'userAgent') || '';


/***/ }),

/***/ "./node_modules/core-js/internals/engine-v8-version.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/internals/engine-v8-version.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "./node_modules/core-js/internals/engine-user-agent.js");

var process = global.process;
var versions = process && process.versions;
var v8 = versions && versions.v8;
var match, version;

if (v8) {
  match = v8.split('.');
  version = match[0] < 4 ? 1 : match[0] + match[1];
} else if (userAgent) {
  match = userAgent.match(/Edge\/(\d+)/);
  if (!match || match[1] >= 74) {
    match = userAgent.match(/Chrome\/(\d+)/);
    if (match) version = match[1];
  }
}

module.exports = version && +version;


/***/ }),

/***/ "./node_modules/core-js/internals/enum-bug-keys.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/internals/enum-bug-keys.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

// IE8- don't enum bug keys
module.exports = [
  'constructor',
  'hasOwnProperty',
  'isPrototypeOf',
  'propertyIsEnumerable',
  'toLocaleString',
  'toString',
  'valueOf'
];


/***/ }),

/***/ "./node_modules/core-js/internals/export.js":
/*!**************************************************!*\
  !*** ./node_modules/core-js/internals/export.js ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
var setGlobal = __webpack_require__(/*! ../internals/set-global */ "./node_modules/core-js/internals/set-global.js");
var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ "./node_modules/core-js/internals/copy-constructor-properties.js");
var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js");

/*
  options.target      - name of the target object
  options.global      - target is the global object
  options.stat        - export as static methods of target
  options.proto       - export as prototype methods of target
  options.real        - real prototype method for the `pure` version
  options.forced      - export even if the native feature is available
  options.bind        - bind methods to the target, required for the `pure` version
  options.wrap        - wrap constructors to preventing global pollution, required for the `pure` version
  options.unsafe      - use the simple assignment of property instead of delete + defineProperty
  options.sham        - add a flag to not completely full polyfills
  options.enumerable  - export as enumerable property
  options.noTargetGet - prevent calling a getter on target
*/
module.exports = function (options, source) {
  var TARGET = options.target;
  var GLOBAL = options.global;
  var STATIC = options.stat;
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  if (GLOBAL) {
    target = global;
  } else if (STATIC) {
    target = global[TARGET] || setGlobal(TARGET, {});
  } else {
    target = (global[TARGET] || {}).prototype;
  }
  if (target) for (key in source) {
    sourceProperty = source[key];
    if (options.noTargetGet) {
      descriptor = getOwnPropertyDescriptor(target, key);
      targetProperty = descriptor && descriptor.value;
    } else targetProperty = target[key];
    FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
    // contained in target
    if (!FORCED && targetProperty !== undefined) {
      if (typeof sourceProperty === typeof targetProperty) continue;
      copyConstructorProperties(sourceProperty, targetProperty);
    }
    // add a flag to not completely full polyfills
    if (options.sham || (targetProperty && targetProperty.sham)) {
      createNonEnumerableProperty(sourceProperty, 'sham', true);
    }
    // extend global
    redefine(target, key, sourceProperty, options);
  }
};


/***/ }),

/***/ "./node_modules/core-js/internals/fails.js":
/*!*************************************************!*\
  !*** ./node_modules/core-js/internals/fails.js ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = function (exec) {
  try {
    return !!exec();
  } catch (error) {
    return true;
  }
};


/***/ }),

/***/ "./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js":
/*!******************************************************************************!*\
  !*** ./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js ***!
  \******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// TODO: Remove from `core-js@4` since it's moved to entry points
__webpack_require__(/*! ../modules/es.regexp.exec */ "./node_modules/core-js/modules/es.regexp.exec.js");
var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
var regexpExec = __webpack_require__(/*! ../internals/regexp-exec */ "./node_modules/core-js/internals/regexp-exec.js");
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");

var SPECIES = wellKnownSymbol('species');
var RegExpPrototype = RegExp.prototype;

var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  // #replace needs built-in support for named groups.
  // #match works fine because it just return the exec results, even if it has
  // a "grops" property.
  var re = /./;
  re.exec = function () {
    var result = [];
    result.groups = { a: '7' };
    return result;
  };
  return ''.replace(re, '$<a>') !== '7';
});

// IE <= 11 replaces $0 with the whole match, as if it was $&
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
var REPLACE_KEEPS_$0 = (function () {
  // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
  return 'a'.replace(/./, '$0') === '$0';
})();

var REPLACE = wellKnownSymbol('replace');
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  if (/./[REPLACE]) {
    return /./[REPLACE]('a', '$0') === '';
  }
  return false;
})();

// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
  // eslint-disable-next-line regexp/no-empty-group -- required for testing
  var re = /(?:)/;
  var originalExec = re.exec;
  re.exec = function () { return originalExec.apply(this, arguments); };
  var result = 'ab'.split(re);
  return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
});

module.exports = function (KEY, length, exec, sham) {
  var SYMBOL = wellKnownSymbol(KEY);

  var DELEGATES_TO_SYMBOL = !fails(function () {
    // String methods call symbol-named RegEp methods
    var O = {};
    O[SYMBOL] = function () { return 7; };
    return ''[KEY](O) != 7;
  });

  var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
    // Symbol-named RegExp methods call .exec
    var execCalled = false;
    var re = /a/;

    if (KEY === 'split') {
      // We can't use real regex here since it causes deoptimization
      // and serious performance degradation in V8
      // https://github.com/zloirock/core-js/issues/306
      re = {};
      // RegExp[@@split] doesn't call the regex's exec method, but first creates
      // a new one. We need to return the patched regex when creating the new one.
      re.constructor = {};
      re.constructor[SPECIES] = function () { return re; };
      re.flags = '';
      re[SYMBOL] = /./[SYMBOL];
    }

    re.exec = function () { execCalled = true; return null; };

    re[SYMBOL]('');
    return !execCalled;
  });

  if (
    !DELEGATES_TO_SYMBOL ||
    !DELEGATES_TO_EXEC ||
    (KEY === 'replace' && !(
      REPLACE_SUPPORTS_NAMED_GROUPS &&
      REPLACE_KEEPS_$0 &&
      !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
    )) ||
    (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
  ) {
    var nativeRegExpMethod = /./[SYMBOL];
    var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
      var $exec = regexp.exec;
      if ($exec === regexpExec || $exec === RegExpPrototype.exec) {
        if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
          // The native String method already delegates to @@method (this
          // polyfilled function), leasing to infinite recursion.
          // We avoid it by directly calling the native @@method method.
          return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
        }
        return { done: true, value: nativeMethod.call(str, regexp, arg2) };
      }
      return { done: false };
    }, {
      REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
      REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
    });
    var stringMethod = methods[0];
    var regexMethod = methods[1];

    redefine(String.prototype, KEY, stringMethod);
    redefine(RegExpPrototype, SYMBOL, length == 2
      // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
      // 21.2.5.11 RegExp.prototype[@@split](string, limit)
      ? function (string, arg) { return regexMethod.call(string, this, arg); }
      // 21.2.5.6 RegExp.prototype[@@match](string)
      // 21.2.5.9 RegExp.prototype[@@search](string)
      : function (string) { return regexMethod.call(string, this); }
    );
  }

  if (sham) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
};


/***/ }),

/***/ "./node_modules/core-js/internals/function-bind-context.js":
/*!*****************************************************************!*\
  !*** ./node_modules/core-js/internals/function-bind-context.js ***!
  \*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");

// optional / simple context binding
module.exports = function (fn, that, length) {
  aFunction(fn);
  if (that === undefined) return fn;
  switch (length) {
    case 0: return function () {
      return fn.call(that);
    };
    case 1: return function (a) {
      return fn.call(that, a);
    };
    case 2: return function (a, b) {
      return fn.call(that, a, b);
    };
    case 3: return function (a, b, c) {
      return fn.call(that, a, b, c);
    };
  }
  return function (/* ...args */) {
    return fn.apply(that, arguments);
  };
};


/***/ }),

/***/ "./node_modules/core-js/internals/function-bind.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/internals/function-bind.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");

var slice = [].slice;
var factories = {};

var construct = function (C, argsLength, args) {
  if (!(argsLength in factories)) {
    for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
    // eslint-disable-next-line no-new-func -- we have no proper alternatives, IE8- only
    factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');
  } return factories[argsLength](C, args);
};

// `Function.prototype.bind` method implementation
// https://tc39.es/ecma262/#sec-function.prototype.bind
module.exports = Function.bind || function bind(that /* , ...args */) {
  var fn = aFunction(this);
  var partArgs = slice.call(arguments, 1);
  var boundFunction = function bound(/* args... */) {
    var args = partArgs.concat(slice.call(arguments));
    return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);
  };
  if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;
  return boundFunction;
};


/***/ }),

/***/ "./node_modules/core-js/internals/get-built-in.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/internals/get-built-in.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var path = __webpack_require__(/*! ../internals/path */ "./node_modules/core-js/internals/path.js");
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");

var aFunction = function (variable) {
  return typeof variable == 'function' ? variable : undefined;
};

module.exports = function (namespace, method) {
  return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
    : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
};


/***/ }),

/***/ "./node_modules/core-js/internals/get-iterator-method.js":
/*!***************************************************************!*\
  !*** ./node_modules/core-js/internals/get-iterator-method.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__(/*! ../internals/classof */ "./node_modules/core-js/internals/classof.js");
var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");

var ITERATOR = wellKnownSymbol('iterator');

module.exports = function (it) {
  if (it != undefined) return it[ITERATOR]
    || it['@@iterator']
    || Iterators[classof(it)];
};


/***/ }),

/***/ "./node_modules/core-js/internals/get-substitution.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/internals/get-substitution.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");

var floor = Math.floor;
var replace = ''.replace;
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;

// https://tc39.es/ecma262/#sec-getsubstitution
module.exports = function (matched, str, position, captures, namedCaptures, replacement) {
  var tailPos = position + matched.length;
  var m = captures.length;
  var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  if (namedCaptures !== undefined) {
    namedCaptures = toObject(namedCaptures);
    symbols = SUBSTITUTION_SYMBOLS;
  }
  return replace.call(replacement, symbols, function (match, ch) {
    var capture;
    switch (ch.charAt(0)) {
      case '$': return '$';
      case '&': return matched;
      case '`': return str.slice(0, position);
      case "'": return str.slice(tailPos);
      case '<':
        capture = namedCaptures[ch.slice(1, -1)];
        break;
      default: // \d\d?
        var n = +ch;
        if (n === 0) return match;
        if (n > m) {
          var f = floor(n / 10);
          if (f === 0) return match;
          if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
          return match;
        }
        capture = captures[n - 1];
    }
    return capture === undefined ? '' : capture;
  });
};


/***/ }),

/***/ "./node_modules/core-js/internals/global.js":
/*!**************************************************!*\
  !*** ./node_modules/core-js/internals/global.js ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global) {var check = function (it) {
  return it && it.Math == Math && it;
};

// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
module.exports =
  // eslint-disable-next-line es/no-global-this -- safe
  check(typeof globalThis == 'object' && globalThis) ||
  check(typeof window == 'object' && window) ||
  // eslint-disable-next-line no-restricted-globals -- safe
  check(typeof self == 'object' && self) ||
  check(typeof global == 'object' && global) ||
  // eslint-disable-next-line no-new-func -- fallback
  (function () { return this; })() || Function('return this')();

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

/***/ }),

/***/ "./node_modules/core-js/internals/has.js":
/*!***********************************************!*\
  !*** ./node_modules/core-js/internals/has.js ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");

var hasOwnProperty = {}.hasOwnProperty;

module.exports = function hasOwn(it, key) {
  return hasOwnProperty.call(toObject(it), key);
};


/***/ }),

/***/ "./node_modules/core-js/internals/hidden-keys.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/internals/hidden-keys.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = {};


/***/ }),

/***/ "./node_modules/core-js/internals/html.js":
/*!************************************************!*\
  !*** ./node_modules/core-js/internals/html.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");

module.exports = getBuiltIn('document', 'documentElement');


/***/ }),

/***/ "./node_modules/core-js/internals/ie8-dom-define.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/internals/ie8-dom-define.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
var createElement = __webpack_require__(/*! ../internals/document-create-element */ "./node_modules/core-js/internals/document-create-element.js");

// Thank's IE8 for his funny defineProperty
module.exports = !DESCRIPTORS && !fails(function () {
  // eslint-disable-next-line es/no-object-defineproperty -- requied for testing
  return Object.defineProperty(createElement('div'), 'a', {
    get: function () { return 7; }
  }).a != 7;
});


/***/ }),

/***/ "./node_modules/core-js/internals/indexed-object.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/internals/indexed-object.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");

var split = ''.split;

// fallback for non-array-like ES3 and non-enumerable old V8 strings
module.exports = fails(function () {
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  // eslint-disable-next-line no-prototype-builtins -- safe
  return !Object('z').propertyIsEnumerable(0);
}) ? function (it) {
  return classof(it) == 'String' ? split.call(it, '') : Object(it);
} : Object;


/***/ }),

/***/ "./node_modules/core-js/internals/inherit-if-required.js":
/*!***************************************************************!*\
  !*** ./node_modules/core-js/internals/inherit-if-required.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/core-js/internals/object-set-prototype-of.js");

// makes subclassing work correct for wrapped built-ins
module.exports = function ($this, dummy, Wrapper) {
  var NewTarget, NewTargetPrototype;
  if (
    // it can work only with native `setPrototypeOf`
    setPrototypeOf &&
    // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
    typeof (NewTarget = dummy.constructor) == 'function' &&
    NewTarget !== Wrapper &&
    isObject(NewTargetPrototype = NewTarget.prototype) &&
    NewTargetPrototype !== Wrapper.prototype
  ) setPrototypeOf($this, NewTargetPrototype);
  return $this;
};


/***/ }),

/***/ "./node_modules/core-js/internals/inspect-source.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/internals/inspect-source.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var store = __webpack_require__(/*! ../internals/shared-store */ "./node_modules/core-js/internals/shared-store.js");

var functionToString = Function.toString;

// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
if (typeof store.inspectSource != 'function') {
  store.inspectSource = function (it) {
    return functionToString.call(it);
  };
}

module.exports = store.inspectSource;


/***/ }),

/***/ "./node_modules/core-js/internals/internal-state.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/internals/internal-state.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/native-weak-map */ "./node_modules/core-js/internals/native-weak-map.js");
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
var objectHas = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
var shared = __webpack_require__(/*! ../internals/shared-store */ "./node_modules/core-js/internals/shared-store.js");
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js");
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");

var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
var WeakMap = global.WeakMap;
var set, get, has;

var enforce = function (it) {
  return has(it) ? get(it) : set(it, {});
};

var getterFor = function (TYPE) {
  return function (it) {
    var state;
    if (!isObject(it) || (state = get(it)).type !== TYPE) {
      throw TypeError('Incompatible receiver, ' + TYPE + ' required');
    } return state;
  };
};

if (NATIVE_WEAK_MAP || shared.state) {
  var store = shared.state || (shared.state = new WeakMap());
  var wmget = store.get;
  var wmhas = store.has;
  var wmset = store.set;
  set = function (it, metadata) {
    if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
    metadata.facade = it;
    wmset.call(store, it, metadata);
    return metadata;
  };
  get = function (it) {
    return wmget.call(store, it) || {};
  };
  has = function (it) {
    return wmhas.call(store, it);
  };
} else {
  var STATE = sharedKey('state');
  hiddenKeys[STATE] = true;
  set = function (it, metadata) {
    if (objectHas(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
    metadata.facade = it;
    createNonEnumerableProperty(it, STATE, metadata);
    return metadata;
  };
  get = function (it) {
    return objectHas(it, STATE) ? it[STATE] : {};
  };
  has = function (it) {
    return objectHas(it, STATE);
  };
}

module.exports = {
  set: set,
  get: get,
  has: has,
  enforce: enforce,
  getterFor: getterFor
};


/***/ }),

/***/ "./node_modules/core-js/internals/is-array-iterator-method.js":
/*!********************************************************************!*\
  !*** ./node_modules/core-js/internals/is-array-iterator-method.js ***!
  \********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");

var ITERATOR = wellKnownSymbol('iterator');
var ArrayPrototype = Array.prototype;

// check on default Array iterator
module.exports = function (it) {
  return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
};


/***/ }),

/***/ "./node_modules/core-js/internals/is-array.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/internals/is-array.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");

// `IsArray` abstract operation
// https://tc39.es/ecma262/#sec-isarray
// eslint-disable-next-line es/no-array-isarray -- safe
module.exports = Array.isArray || function isArray(arg) {
  return classof(arg) == 'Array';
};


/***/ }),

/***/ "./node_modules/core-js/internals/is-forced.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/internals/is-forced.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");

var replacement = /#|\.prototype\./;

var isForced = function (feature, detection) {
  var value = data[normalize(feature)];
  return value == POLYFILL ? true
    : value == NATIVE ? false
    : typeof detection == 'function' ? fails(detection)
    : !!detection;
};

var normalize = isForced.normalize = function (string) {
  return String(string).replace(replacement, '.').toLowerCase();
};

var data = isForced.data = {};
var NATIVE = isForced.NATIVE = 'N';
var POLYFILL = isForced.POLYFILL = 'P';

module.exports = isForced;


/***/ }),

/***/ "./node_modules/core-js/internals/is-object.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/internals/is-object.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = function (it) {
  return typeof it === 'object' ? it !== null : typeof it === 'function';
};


/***/ }),

/***/ "./node_modules/core-js/internals/is-pure.js":
/*!***************************************************!*\
  !*** ./node_modules/core-js/internals/is-pure.js ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = false;


/***/ }),

/***/ "./node_modules/core-js/internals/is-regexp.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/internals/is-regexp.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");

var MATCH = wellKnownSymbol('match');

// `IsRegExp` abstract operation
// https://tc39.es/ecma262/#sec-isregexp
module.exports = function (it) {
  var isRegExp;
  return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');
};


/***/ }),

/***/ "./node_modules/core-js/internals/iterator-close.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/internals/iterator-close.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");

module.exports = function (iterator) {
  var returnMethod = iterator['return'];
  if (returnMethod !== undefined) {
    return anObject(returnMethod.call(iterator)).value;
  }
};


/***/ }),

/***/ "./node_modules/core-js/internals/iterators-core.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/internals/iterators-core.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/core-js/internals/object-get-prototype-of.js");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");

var ITERATOR = wellKnownSymbol('iterator');
var BUGGY_SAFARI_ITERATORS = false;

var returnThis = function () { return this; };

// `%IteratorPrototype%` object
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;

/* eslint-disable es/no-array-prototype-keys -- safe */
if ([].keys) {
  arrayIterator = [].keys();
  // Safari 8 has buggy iterators w/o `next`
  if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
  else {
    PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
    if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
  }
}

var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {
  var test = {};
  // FF44- legacy iterators case
  return IteratorPrototype[ITERATOR].call(test) !== test;
});

if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};

// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
if ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) {
  createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
}

module.exports = {
  IteratorPrototype: IteratorPrototype,
  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
};


/***/ }),

/***/ "./node_modules/core-js/internals/iterators.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/internals/iterators.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = {};


/***/ }),

/***/ "./node_modules/core-js/internals/native-symbol.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/internals/native-symbol.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

/* eslint-disable es/no-symbol -- required for testing */
var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");

// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
  return !String(Symbol()) ||
    // Chrome 38 Symbol has incorrect toString conversion
    // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
    !Symbol.sham && V8_VERSION && V8_VERSION < 41;
});


/***/ }),

/***/ "./node_modules/core-js/internals/native-weak-map.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/internals/native-weak-map.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "./node_modules/core-js/internals/inspect-source.js");

var WeakMap = global.WeakMap;

module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));


/***/ }),

/***/ "./node_modules/core-js/internals/not-a-regexp.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/internals/not-a-regexp.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var isRegExp = __webpack_require__(/*! ../internals/is-regexp */ "./node_modules/core-js/internals/is-regexp.js");

module.exports = function (it) {
  if (isRegExp(it)) {
    throw TypeError("The method doesn't accept regular expressions");
  } return it;
};


/***/ }),

/***/ "./node_modules/core-js/internals/number-parse-float.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/internals/number-parse-float.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var trim = __webpack_require__(/*! ../internals/string-trim */ "./node_modules/core-js/internals/string-trim.js").trim;
var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ "./node_modules/core-js/internals/whitespaces.js");

var $parseFloat = global.parseFloat;
var FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity;

// `parseFloat` method
// https://tc39.es/ecma262/#sec-parsefloat-string
module.exports = FORCED ? function parseFloat(string) {
  var trimmedString = trim(String(string));
  var result = $parseFloat(trimmedString);
  return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result;
} : $parseFloat;


/***/ }),

/***/ "./node_modules/core-js/internals/number-parse-int.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/internals/number-parse-int.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var trim = __webpack_require__(/*! ../internals/string-trim */ "./node_modules/core-js/internals/string-trim.js").trim;
var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ "./node_modules/core-js/internals/whitespaces.js");

var $parseInt = global.parseInt;
var hex = /^[+-]?0[Xx]/;
var FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22;

// `parseInt` method
// https://tc39.es/ecma262/#sec-parseint-string-radix
module.exports = FORCED ? function parseInt(string, radix) {
  var S = trim(String(string));
  return $parseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));
} : $parseInt;


/***/ }),

/***/ "./node_modules/core-js/internals/object-assign.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/internals/object-assign.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "./node_modules/core-js/internals/object-keys.js");
var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "./node_modules/core-js/internals/object-get-own-property-symbols.js");
var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "./node_modules/core-js/internals/object-property-is-enumerable.js");
var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/core-js/internals/indexed-object.js");

// eslint-disable-next-line es/no-object-assign -- safe
var $assign = Object.assign;
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
var defineProperty = Object.defineProperty;

// `Object.assign` method
// https://tc39.es/ecma262/#sec-object.assign
module.exports = !$assign || fails(function () {
  // should have correct order of operations (Edge bug)
  if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
    enumerable: true,
    get: function () {
      defineProperty(this, 'b', {
        value: 3,
        enumerable: false
      });
    }
  }), { b: 2 })).b !== 1) return true;
  // should work with symbols and should have deterministic property order (V8 bug)
  var A = {};
  var B = {};
  // eslint-disable-next-line es/no-symbol -- safe
  var symbol = Symbol();
  var alphabet = 'abcdefghijklmnopqrst';
  A[symbol] = 7;
  alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  var T = toObject(target);
  var argumentsLength = arguments.length;
  var index = 1;
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  var propertyIsEnumerable = propertyIsEnumerableModule.f;
  while (argumentsLength > index) {
    var S = IndexedObject(arguments[index++]);
    var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
    var length = keys.length;
    var j = 0;
    var key;
    while (length > j) {
      key = keys[j++];
      if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];
    }
  } return T;
} : $assign;


/***/ }),

/***/ "./node_modules/core-js/internals/object-create.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/internals/object-create.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
var defineProperties = __webpack_require__(/*! ../internals/object-define-properties */ "./node_modules/core-js/internals/object-define-properties.js");
var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "./node_modules/core-js/internals/enum-bug-keys.js");
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");
var html = __webpack_require__(/*! ../internals/html */ "./node_modules/core-js/internals/html.js");
var documentCreateElement = __webpack_require__(/*! ../internals/document-create-element */ "./node_modules/core-js/internals/document-create-element.js");
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js");

var GT = '>';
var LT = '<';
var PROTOTYPE = 'prototype';
var SCRIPT = 'script';
var IE_PROTO = sharedKey('IE_PROTO');

var EmptyConstructor = function () { /* empty */ };

var scriptTag = function (content) {
  return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
};

// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
var NullProtoObjectViaActiveX = function (activeXDocument) {
  activeXDocument.write(scriptTag(''));
  activeXDocument.close();
  var temp = activeXDocument.parentWindow.Object;
  activeXDocument = null; // avoid memory leak
  return temp;
};

// Create object with fake `null` prototype: use iframe Object with cleared prototype
var NullProtoObjectViaIFrame = function () {
  // Thrash, waste and sodomy: IE GC bug
  var iframe = documentCreateElement('iframe');
  var JS = 'java' + SCRIPT + ':';
  var iframeDocument;
  iframe.style.display = 'none';
  html.appendChild(iframe);
  // https://github.com/zloirock/core-js/issues/475
  iframe.src = String(JS);
  iframeDocument = iframe.contentWindow.document;
  iframeDocument.open();
  iframeDocument.write(scriptTag('document.F=Object'));
  iframeDocument.close();
  return iframeDocument.F;
};

// Check for document.domain and active x support
// No need to use active x approach when document.domain is not set
// see https://github.com/es-shims/es5-shim/issues/150
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
// avoid IE GC bug
var activeXDocument;
var NullProtoObject = function () {
  try {
    /* global ActiveXObject -- old IE */
    activeXDocument = document.domain && new ActiveXObject('htmlfile');
  } catch (error) { /* ignore */ }
  NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
  var length = enumBugKeys.length;
  while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  return NullProtoObject();
};

hiddenKeys[IE_PROTO] = true;

// `Object.create` method
// https://tc39.es/ecma262/#sec-object.create
module.exports = Object.create || function create(O, Properties) {
  var result;
  if (O !== null) {
    EmptyConstructor[PROTOTYPE] = anObject(O);
    result = new EmptyConstructor();
    EmptyConstructor[PROTOTYPE] = null;
    // add "__proto__" for Object.getPrototypeOf polyfill
    result[IE_PROTO] = O;
  } else result = NullProtoObject();
  return Properties === undefined ? result : defineProperties(result, Properties);
};


/***/ }),

/***/ "./node_modules/core-js/internals/object-define-properties.js":
/*!********************************************************************!*\
  !*** ./node_modules/core-js/internals/object-define-properties.js ***!
  \********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "./node_modules/core-js/internals/object-keys.js");

// `Object.defineProperties` method
// https://tc39.es/ecma262/#sec-object.defineproperties
// eslint-disable-next-line es/no-object-defineproperties -- safe
module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
  anObject(O);
  var keys = objectKeys(Properties);
  var length = keys.length;
  var index = 0;
  var key;
  while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
  return O;
};


/***/ }),

/***/ "./node_modules/core-js/internals/object-define-property.js":
/*!******************************************************************!*\
  !*** ./node_modules/core-js/internals/object-define-property.js ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "./node_modules/core-js/internals/ie8-dom-define.js");
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");

// eslint-disable-next-line es/no-object-defineproperty -- safe
var $defineProperty = Object.defineProperty;

// `Object.defineProperty` method
// https://tc39.es/ecma262/#sec-object.defineproperty
exports.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) {
  anObject(O);
  P = toPrimitive(P, true);
  anObject(Attributes);
  if (IE8_DOM_DEFINE) try {
    return $defineProperty(O, P, Attributes);
  } catch (error) { /* empty */ }
  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  if ('value' in Attributes) O[P] = Attributes.value;
  return O;
};


/***/ }),

/***/ "./node_modules/core-js/internals/object-get-own-property-descriptor.js":
/*!******************************************************************************!*\
  !*** ./node_modules/core-js/internals/object-get-own-property-descriptor.js ***!
  \******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "./node_modules/core-js/internals/object-property-is-enumerable.js");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");
var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "./node_modules/core-js/internals/ie8-dom-define.js");

// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;

// `Object.getOwnPropertyDescriptor` method
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  O = toIndexedObject(O);
  P = toPrimitive(P, true);
  if (IE8_DOM_DEFINE) try {
    return $getOwnPropertyDescriptor(O, P);
  } catch (error) { /* empty */ }
  if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
};


/***/ }),

/***/ "./node_modules/core-js/internals/object-get-own-property-names-external.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/core-js/internals/object-get-own-property-names-external.js ***!
  \**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

/* eslint-disable es/no-object-getownpropertynames -- safe */
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
var $getOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js").f;

var toString = {}.toString;

var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  ? Object.getOwnPropertyNames(window) : [];

var getWindowNames = function (it) {
  try {
    return $getOwnPropertyNames(it);
  } catch (error) {
    return windowNames.slice();
  }
};

// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
module.exports.f = function getOwnPropertyNames(it) {
  return windowNames && toString.call(it) == '[object Window]'
    ? getWindowNames(it)
    : $getOwnPropertyNames(toIndexedObject(it));
};


/***/ }),

/***/ "./node_modules/core-js/internals/object-get-own-property-names.js":
/*!*************************************************************************!*\
  !*** ./node_modules/core-js/internals/object-get-own-property-names.js ***!
  \*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ "./node_modules/core-js/internals/object-keys-internal.js");
var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "./node_modules/core-js/internals/enum-bug-keys.js");

var hiddenKeys = enumBugKeys.concat('length', 'prototype');

// `Object.getOwnPropertyNames` method
// https://tc39.es/ecma262/#sec-object.getownpropertynames
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  return internalObjectKeys(O, hiddenKeys);
};


/***/ }),

/***/ "./node_modules/core-js/internals/object-get-own-property-symbols.js":
/*!***************************************************************************!*\
  !*** ./node_modules/core-js/internals/object-get-own-property-symbols.js ***!
  \***************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
exports.f = Object.getOwnPropertySymbols;


/***/ }),

/***/ "./node_modules/core-js/internals/object-get-prototype-of.js":
/*!*******************************************************************!*\
  !*** ./node_modules/core-js/internals/object-get-prototype-of.js ***!
  \*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js");
var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "./node_modules/core-js/internals/correct-prototype-getter.js");

var IE_PROTO = sharedKey('IE_PROTO');
var ObjectPrototype = Object.prototype;

// `Object.getPrototypeOf` method
// https://tc39.es/ecma262/#sec-object.getprototypeof
// eslint-disable-next-line es/no-object-getprototypeof -- safe
module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
  O = toObject(O);
  if (has(O, IE_PROTO)) return O[IE_PROTO];
  if (typeof O.constructor == 'function' && O instanceof O.constructor) {
    return O.constructor.prototype;
  } return O instanceof Object ? ObjectPrototype : null;
};


/***/ }),

/***/ "./node_modules/core-js/internals/object-keys-internal.js":
/*!****************************************************************!*\
  !*** ./node_modules/core-js/internals/object-keys-internal.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
var indexOf = __webpack_require__(/*! ../internals/array-includes */ "./node_modules/core-js/internals/array-includes.js").indexOf;
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");

module.exports = function (object, names) {
  var O = toIndexedObject(object);
  var i = 0;
  var result = [];
  var key;
  for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
  // Don't enum bug & hidden keys
  while (names.length > i) if (has(O, key = names[i++])) {
    ~indexOf(result, key) || result.push(key);
  }
  return result;
};


/***/ }),

/***/ "./node_modules/core-js/internals/object-keys.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/internals/object-keys.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ "./node_modules/core-js/internals/object-keys-internal.js");
var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "./node_modules/core-js/internals/enum-bug-keys.js");

// `Object.keys` method
// https://tc39.es/ecma262/#sec-object.keys
// eslint-disable-next-line es/no-object-keys -- safe
module.exports = Object.keys || function keys(O) {
  return internalObjectKeys(O, enumBugKeys);
};


/***/ }),

/***/ "./node_modules/core-js/internals/object-property-is-enumerable.js":
/*!*************************************************************************!*\
  !*** ./node_modules/core-js/internals/object-property-is-enumerable.js ***!
  \*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $propertyIsEnumerable = {}.propertyIsEnumerable;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;

// Nashorn ~ JDK8 bug
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);

// `Object.prototype.propertyIsEnumerable` method implementation
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  var descriptor = getOwnPropertyDescriptor(this, V);
  return !!descriptor && descriptor.enumerable;
} : $propertyIsEnumerable;


/***/ }),

/***/ "./node_modules/core-js/internals/object-set-prototype-of.js":
/*!*******************************************************************!*\
  !*** ./node_modules/core-js/internals/object-set-prototype-of.js ***!
  \*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

/* eslint-disable no-proto -- safe */
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
var aPossiblePrototype = __webpack_require__(/*! ../internals/a-possible-prototype */ "./node_modules/core-js/internals/a-possible-prototype.js");

// `Object.setPrototypeOf` method
// https://tc39.es/ecma262/#sec-object.setprototypeof
// Works with __proto__ only. Old v8 can't work with null proto objects.
// eslint-disable-next-line es/no-object-setprototypeof -- safe
module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  var CORRECT_SETTER = false;
  var test = {};
  var setter;
  try {
    // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
    setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
    setter.call(test, []);
    CORRECT_SETTER = test instanceof Array;
  } catch (error) { /* empty */ }
  return function setPrototypeOf(O, proto) {
    anObject(O);
    aPossiblePrototype(proto);
    if (CORRECT_SETTER) setter.call(O, proto);
    else O.__proto__ = proto;
    return O;
  };
}() : undefined);


/***/ }),

/***/ "./node_modules/core-js/internals/object-to-array.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/internals/object-to-array.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "./node_modules/core-js/internals/object-keys.js");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
var propertyIsEnumerable = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "./node_modules/core-js/internals/object-property-is-enumerable.js").f;

// `Object.{ entries, values }` methods implementation
var createMethod = function (TO_ENTRIES) {
  return function (it) {
    var O = toIndexedObject(it);
    var keys = objectKeys(O);
    var length = keys.length;
    var i = 0;
    var result = [];
    var key;
    while (length > i) {
      key = keys[i++];
      if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {
        result.push(TO_ENTRIES ? [key, O[key]] : O[key]);
      }
    }
    return result;
  };
};

module.exports = {
  // `Object.entries` method
  // https://tc39.es/ecma262/#sec-object.entries
  entries: createMethod(true),
  // `Object.values` method
  // https://tc39.es/ecma262/#sec-object.values
  values: createMethod(false)
};


/***/ }),

/***/ "./node_modules/core-js/internals/object-to-string.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/internals/object-to-string.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "./node_modules/core-js/internals/to-string-tag-support.js");
var classof = __webpack_require__(/*! ../internals/classof */ "./node_modules/core-js/internals/classof.js");

// `Object.prototype.toString` method implementation
// https://tc39.es/ecma262/#sec-object.prototype.tostring
module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
  return '[object ' + classof(this) + ']';
};


/***/ }),

/***/ "./node_modules/core-js/internals/own-keys.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/internals/own-keys.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
var getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js");
var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "./node_modules/core-js/internals/object-get-own-property-symbols.js");
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");

// all object keys, includes non-enumerable and symbols
module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  var keys = getOwnPropertyNamesModule.f(anObject(it));
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
};


/***/ }),

/***/ "./node_modules/core-js/internals/path.js":
/*!************************************************!*\
  !*** ./node_modules/core-js/internals/path.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");

module.exports = global;


/***/ }),

/***/ "./node_modules/core-js/internals/redefine.js":
/*!****************************************************!*\
  !*** ./node_modules/core-js/internals/redefine.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
var setGlobal = __webpack_require__(/*! ../internals/set-global */ "./node_modules/core-js/internals/set-global.js");
var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "./node_modules/core-js/internals/inspect-source.js");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");

var getInternalState = InternalStateModule.get;
var enforceInternalState = InternalStateModule.enforce;
var TEMPLATE = String(String).split('String');

(module.exports = function (O, key, value, options) {
  var unsafe = options ? !!options.unsafe : false;
  var simple = options ? !!options.enumerable : false;
  var noTargetGet = options ? !!options.noTargetGet : false;
  var state;
  if (typeof value == 'function') {
    if (typeof key == 'string' && !has(value, 'name')) {
      createNonEnumerableProperty(value, 'name', key);
    }
    state = enforceInternalState(value);
    if (!state.source) {
      state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
    }
  }
  if (O === global) {
    if (simple) O[key] = value;
    else setGlobal(key, value);
    return;
  } else if (!unsafe) {
    delete O[key];
  } else if (!noTargetGet && O[key]) {
    simple = true;
  }
  if (simple) O[key] = value;
  else createNonEnumerableProperty(O, key, value);
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, 'toString', function toString() {
  return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
});


/***/ }),

/***/ "./node_modules/core-js/internals/regexp-exec-abstract.js":
/*!****************************************************************!*\
  !*** ./node_modules/core-js/internals/regexp-exec-abstract.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__(/*! ./classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
var regexpExec = __webpack_require__(/*! ./regexp-exec */ "./node_modules/core-js/internals/regexp-exec.js");

// `RegExpExec` abstract operation
// https://tc39.es/ecma262/#sec-regexpexec
module.exports = function (R, S) {
  var exec = R.exec;
  if (typeof exec === 'function') {
    var result = exec.call(R, S);
    if (typeof result !== 'object') {
      throw TypeError('RegExp exec method returned something other than an Object or null');
    }
    return result;
  }

  if (classof(R) !== 'RegExp') {
    throw TypeError('RegExp#exec called on incompatible receiver');
  }

  return regexpExec.call(R, S);
};



/***/ }),

/***/ "./node_modules/core-js/internals/regexp-exec.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/internals/regexp-exec.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

/* eslint-disable regexp/no-assertion-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
/* eslint-disable regexp/no-useless-quantifier -- testing */
var regexpFlags = __webpack_require__(/*! ./regexp-flags */ "./node_modules/core-js/internals/regexp-flags.js");
var stickyHelpers = __webpack_require__(/*! ./regexp-sticky-helpers */ "./node_modules/core-js/internals/regexp-sticky-helpers.js");
var shared = __webpack_require__(/*! ./shared */ "./node_modules/core-js/internals/shared.js");

var nativeExec = RegExp.prototype.exec;
var nativeReplace = shared('native-string-replace', String.prototype.replace);

var patchedExec = nativeExec;

var UPDATES_LAST_INDEX_WRONG = (function () {
  var re1 = /a/;
  var re2 = /b*/g;
  nativeExec.call(re1, 'a');
  nativeExec.call(re2, 'a');
  return re1.lastIndex !== 0 || re2.lastIndex !== 0;
})();

var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;

// nonparticipating capturing group, copied from es5-shim's String#split patch.
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;

var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;

if (PATCH) {
  patchedExec = function exec(str) {
    var re = this;
    var lastIndex, reCopy, match, i;
    var sticky = UNSUPPORTED_Y && re.sticky;
    var flags = regexpFlags.call(re);
    var source = re.source;
    var charsAdded = 0;
    var strCopy = str;

    if (sticky) {
      flags = flags.replace('y', '');
      if (flags.indexOf('g') === -1) {
        flags += 'g';
      }

      strCopy = String(str).slice(re.lastIndex);
      // Support anchored sticky behavior.
      if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
        source = '(?: ' + source + ')';
        strCopy = ' ' + strCopy;
        charsAdded++;
      }
      // ^(? + rx + ) is needed, in combination with some str slicing, to
      // simulate the 'y' flag.
      reCopy = new RegExp('^(?:' + source + ')', flags);
    }

    if (NPCG_INCLUDED) {
      reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
    }
    if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;

    match = nativeExec.call(sticky ? reCopy : re, strCopy);

    if (sticky) {
      if (match) {
        match.input = match.input.slice(charsAdded);
        match[0] = match[0].slice(charsAdded);
        match.index = re.lastIndex;
        re.lastIndex += match[0].length;
      } else re.lastIndex = 0;
    } else if (UPDATES_LAST_INDEX_WRONG && match) {
      re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
    }
    if (NPCG_INCLUDED && match && match.length > 1) {
      // Fix browsers whose `exec` methods don't consistently return `undefined`
      // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
      nativeReplace.call(match[0], reCopy, function () {
        for (i = 1; i < arguments.length - 2; i++) {
          if (arguments[i] === undefined) match[i] = undefined;
        }
      });
    }

    return match;
  };
}

module.exports = patchedExec;


/***/ }),

/***/ "./node_modules/core-js/internals/regexp-flags.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/internals/regexp-flags.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");

// `RegExp.prototype.flags` getter implementation
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
module.exports = function () {
  var that = anObject(this);
  var result = '';
  if (that.global) result += 'g';
  if (that.ignoreCase) result += 'i';
  if (that.multiline) result += 'm';
  if (that.dotAll) result += 's';
  if (that.unicode) result += 'u';
  if (that.sticky) result += 'y';
  return result;
};


/***/ }),

/***/ "./node_modules/core-js/internals/regexp-sticky-helpers.js":
/*!*****************************************************************!*\
  !*** ./node_modules/core-js/internals/regexp-sticky-helpers.js ***!
  \*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var fails = __webpack_require__(/*! ./fails */ "./node_modules/core-js/internals/fails.js");

// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
// so we use an intermediate function.
function RE(s, f) {
  return RegExp(s, f);
}

exports.UNSUPPORTED_Y = fails(function () {
  // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  var re = RE('a', 'y');
  re.lastIndex = 2;
  return re.exec('abcd') != null;
});

exports.BROKEN_CARET = fails(function () {
  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  var re = RE('^r', 'gy');
  re.lastIndex = 2;
  return re.exec('str') != null;
});


/***/ }),

/***/ "./node_modules/core-js/internals/require-object-coercible.js":
/*!********************************************************************!*\
  !*** ./node_modules/core-js/internals/require-object-coercible.js ***!
  \********************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

// `RequireObjectCoercible` abstract operation
// https://tc39.es/ecma262/#sec-requireobjectcoercible
module.exports = function (it) {
  if (it == undefined) throw TypeError("Can't call method on " + it);
  return it;
};


/***/ }),

/***/ "./node_modules/core-js/internals/set-global.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/internals/set-global.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");

module.exports = function (key, value) {
  try {
    createNonEnumerableProperty(global, key, value);
  } catch (error) {
    global[key] = value;
  } return value;
};


/***/ }),

/***/ "./node_modules/core-js/internals/set-species.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/internals/set-species.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");

var SPECIES = wellKnownSymbol('species');

module.exports = function (CONSTRUCTOR_NAME) {
  var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
  var defineProperty = definePropertyModule.f;

  if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
    defineProperty(Constructor, SPECIES, {
      configurable: true,
      get: function () { return this; }
    });
  }
};


/***/ }),

/***/ "./node_modules/core-js/internals/set-to-string-tag.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/internals/set-to-string-tag.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");

var TO_STRING_TAG = wellKnownSymbol('toStringTag');

module.exports = function (it, TAG, STATIC) {
  if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
    defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
  }
};


/***/ }),

/***/ "./node_modules/core-js/internals/shared-key.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/internals/shared-key.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var shared = __webpack_require__(/*! ../internals/shared */ "./node_modules/core-js/internals/shared.js");
var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js");

var keys = shared('keys');

module.exports = function (key) {
  return keys[key] || (keys[key] = uid(key));
};


/***/ }),

/***/ "./node_modules/core-js/internals/shared-store.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/internals/shared-store.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var setGlobal = __webpack_require__(/*! ../internals/set-global */ "./node_modules/core-js/internals/set-global.js");

var SHARED = '__core-js_shared__';
var store = global[SHARED] || setGlobal(SHARED, {});

module.exports = store;


/***/ }),

/***/ "./node_modules/core-js/internals/shared.js":
/*!**************************************************!*\
  !*** ./node_modules/core-js/internals/shared.js ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
var store = __webpack_require__(/*! ../internals/shared-store */ "./node_modules/core-js/internals/shared-store.js");

(module.exports = function (key, value) {
  return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
  version: '3.12.1',
  mode: IS_PURE ? 'pure' : 'global',
  copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
});


/***/ }),

/***/ "./node_modules/core-js/internals/species-constructor.js":
/*!***************************************************************!*\
  !*** ./node_modules/core-js/internals/species-constructor.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");

var SPECIES = wellKnownSymbol('species');

// `SpeciesConstructor` abstract operation
// https://tc39.es/ecma262/#sec-speciesconstructor
module.exports = function (O, defaultConstructor) {
  var C = anObject(O).constructor;
  var S;
  return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);
};


/***/ }),

/***/ "./node_modules/core-js/internals/string-multibyte.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/internals/string-multibyte.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__(/*! ../internals/to-integer */ "./node_modules/core-js/internals/to-integer.js");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");

// `String.prototype.{ codePointAt, at }` methods implementation
var createMethod = function (CONVERT_TO_STRING) {
  return function ($this, pos) {
    var S = String(requireObjectCoercible($this));
    var position = toInteger(pos);
    var size = S.length;
    var first, second;
    if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
    first = S.charCodeAt(position);
    return first < 0xD800 || first > 0xDBFF || position + 1 === size
      || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
        ? CONVERT_TO_STRING ? S.charAt(position) : first
        : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  };
};

module.exports = {
  // `String.prototype.codePointAt` method
  // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  codeAt: createMethod(false),
  // `String.prototype.at` method
  // https://github.com/mathiasbynens/String.prototype.at
  charAt: createMethod(true)
};


/***/ }),

/***/ "./node_modules/core-js/internals/string-repeat.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/internals/string-repeat.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toInteger = __webpack_require__(/*! ../internals/to-integer */ "./node_modules/core-js/internals/to-integer.js");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");

// `String.prototype.repeat` method implementation
// https://tc39.es/ecma262/#sec-string.prototype.repeat
module.exports = function repeat(count) {
  var str = String(requireObjectCoercible(this));
  var result = '';
  var n = toInteger(count);
  if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions');
  for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;
  return result;
};


/***/ }),

/***/ "./node_modules/core-js/internals/string-trim-forced.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/internals/string-trim-forced.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ "./node_modules/core-js/internals/whitespaces.js");

var non = '\u200B\u0085\u180E';

// check that a method works with the correct list
// of whitespaces and has a correct name
module.exports = function (METHOD_NAME) {
  return fails(function () {
    return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;
  });
};


/***/ }),

/***/ "./node_modules/core-js/internals/string-trim.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/internals/string-trim.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ "./node_modules/core-js/internals/whitespaces.js");

var whitespace = '[' + whitespaces + ']';
var ltrim = RegExp('^' + whitespace + whitespace + '*');
var rtrim = RegExp(whitespace + whitespace + '*$');

// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
var createMethod = function (TYPE) {
  return function ($this) {
    var string = String(requireObjectCoercible($this));
    if (TYPE & 1) string = string.replace(ltrim, '');
    if (TYPE & 2) string = string.replace(rtrim, '');
    return string;
  };
};

module.exports = {
  // `String.prototype.{ trimLeft, trimStart }` methods
  // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  start: createMethod(1),
  // `String.prototype.{ trimRight, trimEnd }` methods
  // https://tc39.es/ecma262/#sec-string.prototype.trimend
  end: createMethod(2),
  // `String.prototype.trim` method
  // https://tc39.es/ecma262/#sec-string.prototype.trim
  trim: createMethod(3)
};


/***/ }),

/***/ "./node_modules/core-js/internals/this-number-value.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/internals/this-number-value.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");

// `thisNumberValue` abstract operation
// https://tc39.es/ecma262/#sec-thisnumbervalue
module.exports = function (value) {
  if (typeof value != 'number' && classof(value) != 'Number') {
    throw TypeError('Incorrect invocation');
  }
  return +value;
};


/***/ }),

/***/ "./node_modules/core-js/internals/to-absolute-index.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/internals/to-absolute-index.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__(/*! ../internals/to-integer */ "./node_modules/core-js/internals/to-integer.js");

var max = Math.max;
var min = Math.min;

// Helper for a popular repeating case of the spec:
// Let integer be ? ToInteger(index).
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
module.exports = function (index, length) {
  var integer = toInteger(index);
  return integer < 0 ? max(integer + length, 0) : min(integer, length);
};


/***/ }),

/***/ "./node_modules/core-js/internals/to-indexed-object.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/internals/to-indexed-object.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// toObject with fallback for non-array-like ES3 strings
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/core-js/internals/indexed-object.js");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");

module.exports = function (it) {
  return IndexedObject(requireObjectCoercible(it));
};


/***/ }),

/***/ "./node_modules/core-js/internals/to-integer.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/internals/to-integer.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

var ceil = Math.ceil;
var floor = Math.floor;

// `ToInteger` abstract operation
// https://tc39.es/ecma262/#sec-tointeger
module.exports = function (argument) {
  return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
};


/***/ }),

/***/ "./node_modules/core-js/internals/to-length.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/internals/to-length.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__(/*! ../internals/to-integer */ "./node_modules/core-js/internals/to-integer.js");

var min = Math.min;

// `ToLength` abstract operation
// https://tc39.es/ecma262/#sec-tolength
module.exports = function (argument) {
  return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
};


/***/ }),

/***/ "./node_modules/core-js/internals/to-object.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/internals/to-object.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");

// `ToObject` abstract operation
// https://tc39.es/ecma262/#sec-toobject
module.exports = function (argument) {
  return Object(requireObjectCoercible(argument));
};


/***/ }),

/***/ "./node_modules/core-js/internals/to-primitive.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/internals/to-primitive.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");

// `ToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-toprimitive
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (input, PREFERRED_STRING) {
  if (!isObject(input)) return input;
  var fn, val;
  if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
  if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  throw TypeError("Can't convert object to primitive value");
};


/***/ }),

/***/ "./node_modules/core-js/internals/to-string-tag-support.js":
/*!*****************************************************************!*\
  !*** ./node_modules/core-js/internals/to-string-tag-support.js ***!
  \*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var test = {};

test[TO_STRING_TAG] = 'z';

module.exports = String(test) === '[object z]';


/***/ }),

/***/ "./node_modules/core-js/internals/uid.js":
/*!***********************************************!*\
  !*** ./node_modules/core-js/internals/uid.js ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports) {

var id = 0;
var postfix = Math.random();

module.exports = function (key) {
  return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
};


/***/ }),

/***/ "./node_modules/core-js/internals/use-symbol-as-uid.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/internals/use-symbol-as-uid.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

/* eslint-disable es/no-symbol -- required for testing */
var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "./node_modules/core-js/internals/native-symbol.js");

module.exports = NATIVE_SYMBOL
  && !Symbol.sham
  && typeof Symbol.iterator == 'symbol';


/***/ }),

/***/ "./node_modules/core-js/internals/well-known-symbol-wrapped.js":
/*!*********************************************************************!*\
  !*** ./node_modules/core-js/internals/well-known-symbol-wrapped.js ***!
  \*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");

exports.f = wellKnownSymbol;


/***/ }),

/***/ "./node_modules/core-js/internals/well-known-symbol.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/internals/well-known-symbol.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var shared = __webpack_require__(/*! ../internals/shared */ "./node_modules/core-js/internals/shared.js");
var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js");
var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "./node_modules/core-js/internals/native-symbol.js");
var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ "./node_modules/core-js/internals/use-symbol-as-uid.js");

var WellKnownSymbolsStore = shared('wks');
var Symbol = global.Symbol;
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;

module.exports = function (name) {
  if (!has(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
    if (NATIVE_SYMBOL && has(Symbol, name)) {
      WellKnownSymbolsStore[name] = Symbol[name];
    } else {
      WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
    }
  } return WellKnownSymbolsStore[name];
};


/***/ }),

/***/ "./node_modules/core-js/internals/whitespaces.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/internals/whitespaces.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

// a string of all valid unicode whitespaces
module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';


/***/ }),

/***/ "./node_modules/core-js/modules/es.array.concat.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.concat.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "./node_modules/core-js/internals/array-species-create.js");
var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");

var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';

// We can't use this feature detection in V8 since it causes
// deoptimization and serious performance degradation
// https://github.com/zloirock/core-js/issues/679
var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
  var array = [];
  array[IS_CONCAT_SPREADABLE] = false;
  return array.concat()[0] !== array;
});

var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');

var isConcatSpreadable = function (O) {
  if (!isObject(O)) return false;
  var spreadable = O[IS_CONCAT_SPREADABLE];
  return spreadable !== undefined ? !!spreadable : isArray(O);
};

var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;

// `Array.prototype.concat` method
// https://tc39.es/ecma262/#sec-array.prototype.concat
// with adding support of @@isConcatSpreadable and @@species
$({ target: 'Array', proto: true, forced: FORCED }, {
  // eslint-disable-next-line no-unused-vars -- required for `.length`
  concat: function concat(arg) {
    var O = toObject(this);
    var A = arraySpeciesCreate(O, 0);
    var n = 0;
    var i, k, length, len, E;
    for (i = -1, length = arguments.length; i < length; i++) {
      E = i === -1 ? O : arguments[i];
      if (isConcatSpreadable(E)) {
        len = toLength(E.length);
        if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
        for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
      } else {
        if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
        createProperty(A, n++, E);
      }
    }
    A.length = n;
    return A;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.array.every.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.every.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var $every = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").every;
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");

var STRICT_METHOD = arrayMethodIsStrict('every');

// `Array.prototype.every` method
// https://tc39.es/ecma262/#sec-array.prototype.every
$({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {
  every: function every(callbackfn /* , thisArg */) {
    return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.array.filter.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.filter.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var $filter = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").filter;
var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js");

var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');

// `Array.prototype.filter` method
// https://tc39.es/ecma262/#sec-array.prototype.filter
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  filter: function filter(callbackfn /* , thisArg */) {
    return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.array.find.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.find.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var $find = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").find;
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "./node_modules/core-js/internals/add-to-unscopables.js");

var FIND = 'find';
var SKIPS_HOLES = true;

// Shouldn't skip holes
if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });

// `Array.prototype.find` method
// https://tc39.es/ecma262/#sec-array.prototype.find
$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  find: function find(callbackfn /* , that = undefined */) {
    return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});

// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables(FIND);


/***/ }),

/***/ "./node_modules/core-js/modules/es.array.for-each.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.for-each.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var forEach = __webpack_require__(/*! ../internals/array-for-each */ "./node_modules/core-js/internals/array-for-each.js");

// `Array.prototype.forEach` method
// https://tc39.es/ecma262/#sec-array.prototype.foreach
// eslint-disable-next-line es/no-array-prototype-foreach -- safe
$({ target: 'Array', proto: true, forced: [].forEach != forEach }, {
  forEach: forEach
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.array.from.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.from.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var from = __webpack_require__(/*! ../internals/array-from */ "./node_modules/core-js/internals/array-from.js");
var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "./node_modules/core-js/internals/check-correctness-of-iteration.js");

var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
  // eslint-disable-next-line es/no-array-from -- required for testing
  Array.from(iterable);
});

// `Array.from` method
// https://tc39.es/ecma262/#sec-array.from
$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {
  from: from
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.array.includes.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.includes.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var $includes = __webpack_require__(/*! ../internals/array-includes */ "./node_modules/core-js/internals/array-includes.js").includes;
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "./node_modules/core-js/internals/add-to-unscopables.js");

// `Array.prototype.includes` method
// https://tc39.es/ecma262/#sec-array.prototype.includes
$({ target: 'Array', proto: true }, {
  includes: function includes(el /* , fromIndex = 0 */) {
    return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  }
});

// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('includes');


/***/ }),

/***/ "./node_modules/core-js/modules/es.array.index-of.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.index-of.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

/* eslint-disable es/no-array-prototype-indexof -- required for testing */
var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var $indexOf = __webpack_require__(/*! ../internals/array-includes */ "./node_modules/core-js/internals/array-includes.js").indexOf;
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");

var nativeIndexOf = [].indexOf;

var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
var STRICT_METHOD = arrayMethodIsStrict('indexOf');

// `Array.prototype.indexOf` method
// https://tc39.es/ecma262/#sec-array.prototype.indexof
$({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {
  indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
    return NEGATIVE_ZERO
      // convert -0 to +0
      ? nativeIndexOf.apply(this, arguments) || 0
      : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.array.is-array.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.is-array.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");

// `Array.isArray` method
// https://tc39.es/ecma262/#sec-array.isarray
$({ target: 'Array', stat: true }, {
  isArray: isArray
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.array.iterator.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.iterator.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "./node_modules/core-js/internals/add-to-unscopables.js");
var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "./node_modules/core-js/internals/define-iterator.js");

var ARRAY_ITERATOR = 'Array Iterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);

// `Array.prototype.entries` method
// https://tc39.es/ecma262/#sec-array.prototype.entries
// `Array.prototype.keys` method
// https://tc39.es/ecma262/#sec-array.prototype.keys
// `Array.prototype.values` method
// https://tc39.es/ecma262/#sec-array.prototype.values
// `Array.prototype[@@iterator]` method
// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
// `CreateArrayIterator` internal method
// https://tc39.es/ecma262/#sec-createarrayiterator
module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
  setInternalState(this, {
    type: ARRAY_ITERATOR,
    target: toIndexedObject(iterated), // target
    index: 0,                          // next index
    kind: kind                         // kind
  });
// `%ArrayIteratorPrototype%.next` method
// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
}, function () {
  var state = getInternalState(this);
  var target = state.target;
  var kind = state.kind;
  var index = state.index++;
  if (!target || index >= target.length) {
    state.target = undefined;
    return { value: undefined, done: true };
  }
  if (kind == 'keys') return { value: index, done: false };
  if (kind == 'values') return { value: target[index], done: false };
  return { value: [index, target[index]], done: false };
}, 'values');

// argumentsList[@@iterator] is %ArrayProto_values%
// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
// https://tc39.es/ecma262/#sec-createmappedargumentsobject
Iterators.Arguments = Iterators.Array;

// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');


/***/ }),

/***/ "./node_modules/core-js/modules/es.array.join.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.join.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/core-js/internals/indexed-object.js");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");

var nativeJoin = [].join;

var ES3_STRINGS = IndexedObject != Object;
var STRICT_METHOD = arrayMethodIsStrict('join', ',');

// `Array.prototype.join` method
// https://tc39.es/ecma262/#sec-array.prototype.join
$({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
  join: function join(separator) {
    return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.array.map.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.map.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var $map = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").map;
var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js");

var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');

// `Array.prototype.map` method
// https://tc39.es/ecma262/#sec-array.prototype.map
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  map: function map(callbackfn /* , thisArg */) {
    return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.array.reduce.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.reduce.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var $reduce = __webpack_require__(/*! ../internals/array-reduce */ "./node_modules/core-js/internals/array-reduce.js").left;
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
var CHROME_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");
var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");

var STRICT_METHOD = arrayMethodIsStrict('reduce');
// Chrome 80-82 has a critical bug
// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;

// `Array.prototype.reduce` method
// https://tc39.es/ecma262/#sec-array.prototype.reduce
$({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {
  reduce: function reduce(callbackfn /* , initialValue */) {
    return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.array.slice.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.slice.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "./node_modules/core-js/internals/to-absolute-index.js");
var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js");

var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');

var SPECIES = wellKnownSymbol('species');
var nativeSlice = [].slice;
var max = Math.max;

// `Array.prototype.slice` method
// https://tc39.es/ecma262/#sec-array.prototype.slice
// fallback for not array-like ES3 strings and DOM objects
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  slice: function slice(start, end) {
    var O = toIndexedObject(this);
    var length = toLength(O.length);
    var k = toAbsoluteIndex(start, length);
    var fin = toAbsoluteIndex(end === undefined ? length : end, length);
    // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
    var Constructor, result, n;
    if (isArray(O)) {
      Constructor = O.constructor;
      // cross-realm fallback
      if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
        Constructor = undefined;
      } else if (isObject(Constructor)) {
        Constructor = Constructor[SPECIES];
        if (Constructor === null) Constructor = undefined;
      }
      if (Constructor === Array || Constructor === undefined) {
        return nativeSlice.call(O, k, fin);
      }
    }
    result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));
    for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
    result.length = n;
    return result;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.array.some.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.some.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var $some = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").some;
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");

var STRICT_METHOD = arrayMethodIsStrict('some');

// `Array.prototype.some` method
// https://tc39.es/ecma262/#sec-array.prototype.some
$({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {
  some: function some(callbackfn /* , thisArg */) {
    return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.array.sort.js":
/*!*******************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.sort.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");

var test = [];
var nativeSort = test.sort;

// IE8-
var FAILS_ON_UNDEFINED = fails(function () {
  test.sort(undefined);
});
// V8 bug
var FAILS_ON_NULL = fails(function () {
  test.sort(null);
});
// Old WebKit
var STRICT_METHOD = arrayMethodIsStrict('sort');

var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD;

// `Array.prototype.sort` method
// https://tc39.es/ecma262/#sec-array.prototype.sort
$({ target: 'Array', proto: true, forced: FORCED }, {
  sort: function sort(comparefn) {
    return comparefn === undefined
      ? nativeSort.call(toObject(this))
      : nativeSort.call(toObject(this), aFunction(comparefn));
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.array.splice.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es.array.splice.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "./node_modules/core-js/internals/to-absolute-index.js");
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "./node_modules/core-js/internals/to-integer.js");
var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "./node_modules/core-js/internals/array-species-create.js");
var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js");

var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');

var max = Math.max;
var min = Math.min;
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';

// `Array.prototype.splice` method
// https://tc39.es/ecma262/#sec-array.prototype.splice
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  splice: function splice(start, deleteCount /* , ...items */) {
    var O = toObject(this);
    var len = toLength(O.length);
    var actualStart = toAbsoluteIndex(start, len);
    var argumentsLength = arguments.length;
    var insertCount, actualDeleteCount, A, k, from, to;
    if (argumentsLength === 0) {
      insertCount = actualDeleteCount = 0;
    } else if (argumentsLength === 1) {
      insertCount = 0;
      actualDeleteCount = len - actualStart;
    } else {
      insertCount = argumentsLength - 2;
      actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);
    }
    if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {
      throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
    }
    A = arraySpeciesCreate(O, actualDeleteCount);
    for (k = 0; k < actualDeleteCount; k++) {
      from = actualStart + k;
      if (from in O) createProperty(A, k, O[from]);
    }
    A.length = actualDeleteCount;
    if (insertCount < actualDeleteCount) {
      for (k = actualStart; k < len - actualDeleteCount; k++) {
        from = k + actualDeleteCount;
        to = k + insertCount;
        if (from in O) O[to] = O[from];
        else delete O[to];
      }
      for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
    } else if (insertCount > actualDeleteCount) {
      for (k = len - actualDeleteCount; k > actualStart; k--) {
        from = k + actualDeleteCount - 1;
        to = k + insertCount - 1;
        if (from in O) O[to] = O[from];
        else delete O[to];
      }
    }
    for (k = 0; k < insertCount; k++) {
      O[k + actualStart] = arguments[k + 2];
    }
    O.length = len - actualDeleteCount + insertCount;
    return A;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.date.now.js":
/*!*****************************************************!*\
  !*** ./node_modules/core-js/modules/es.date.now.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");

// `Date.now` method
// https://tc39.es/ecma262/#sec-date.now
$({ target: 'Date', stat: true }, {
  now: function now() {
    return new Date().getTime();
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.date.to-string.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es.date.to-string.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");

var DatePrototype = Date.prototype;
var INVALID_DATE = 'Invalid Date';
var TO_STRING = 'toString';
var nativeDateToString = DatePrototype[TO_STRING];
var getTime = DatePrototype.getTime;

// `Date.prototype.toString` method
// https://tc39.es/ecma262/#sec-date.prototype.tostring
if (new Date(NaN) + '' != INVALID_DATE) {
  redefine(DatePrototype, TO_STRING, function toString() {
    var value = getTime.call(this);
    // eslint-disable-next-line no-self-compare -- NaN check
    return value === value ? nativeDateToString.call(this) : INVALID_DATE;
  });
}


/***/ }),

/***/ "./node_modules/core-js/modules/es.function.bind.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/es.function.bind.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var bind = __webpack_require__(/*! ../internals/function-bind */ "./node_modules/core-js/internals/function-bind.js");

// `Function.prototype.bind` method
// https://tc39.es/ecma262/#sec-function.prototype.bind
$({ target: 'Function', proto: true }, {
  bind: bind
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.function.name.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/es.function.name.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;

var FunctionPrototype = Function.prototype;
var FunctionPrototypeToString = FunctionPrototype.toString;
var nameRE = /^\s*function ([^ (]*)/;
var NAME = 'name';

// Function instances `.name` property
// https://tc39.es/ecma262/#sec-function-instances-name
if (DESCRIPTORS && !(NAME in FunctionPrototype)) {
  defineProperty(FunctionPrototype, NAME, {
    configurable: true,
    get: function () {
      try {
        return FunctionPrototypeToString.call(this).match(nameRE)[1];
      } catch (error) {
        return '';
      }
    }
  });
}


/***/ }),

/***/ "./node_modules/core-js/modules/es.number.constructor.js":
/*!***************************************************************!*\
  !*** ./node_modules/core-js/modules/es.number.constructor.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js");
var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
var inheritIfRequired = __webpack_require__(/*! ../internals/inherit-if-required */ "./node_modules/core-js/internals/inherit-if-required.js");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
var getOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js").f;
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
var trim = __webpack_require__(/*! ../internals/string-trim */ "./node_modules/core-js/internals/string-trim.js").trim;

var NUMBER = 'Number';
var NativeNumber = global[NUMBER];
var NumberPrototype = NativeNumber.prototype;

// Opera ~12 has broken Object#toString
var BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;

// `ToNumber` abstract operation
// https://tc39.es/ecma262/#sec-tonumber
var toNumber = function (argument) {
  var it = toPrimitive(argument, false);
  var first, third, radix, maxCode, digits, length, index, code;
  if (typeof it == 'string' && it.length > 2) {
    it = trim(it);
    first = it.charCodeAt(0);
    if (first === 43 || first === 45) {
      third = it.charCodeAt(2);
      if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
    } else if (first === 48) {
      switch (it.charCodeAt(1)) {
        case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i
        case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
        default: return +it;
      }
      digits = it.slice(2);
      length = digits.length;
      for (index = 0; index < length; index++) {
        code = digits.charCodeAt(index);
        // parseInt parses a string to a first unavailable symbol
        // but ToNumber should return NaN if a string contains unavailable symbols
        if (code < 48 || code > maxCode) return NaN;
      } return parseInt(digits, radix);
    }
  } return +it;
};

// `Number` constructor
// https://tc39.es/ecma262/#sec-number-constructor
if (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {
  var NumberWrapper = function Number(value) {
    var it = arguments.length < 1 ? 0 : value;
    var dummy = this;
    return dummy instanceof NumberWrapper
      // check on 1..constructor(foo) case
      && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER)
        ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);
  };
  for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (
    // ES3:
    'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
    // ES2015 (in case, if modules with ES2015 Number statics required before):
    'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
    'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' +
    // ESNext
    'fromString,range'
  ).split(','), j = 0, key; keys.length > j; j++) {
    if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {
      defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));
    }
  }
  NumberWrapper.prototype = NumberPrototype;
  NumberPrototype.constructor = NumberWrapper;
  redefine(global, NUMBER, NumberWrapper);
}


/***/ }),

/***/ "./node_modules/core-js/modules/es.number.to-fixed.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/es.number.to-fixed.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "./node_modules/core-js/internals/to-integer.js");
var thisNumberValue = __webpack_require__(/*! ../internals/this-number-value */ "./node_modules/core-js/internals/this-number-value.js");
var repeat = __webpack_require__(/*! ../internals/string-repeat */ "./node_modules/core-js/internals/string-repeat.js");
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");

var nativeToFixed = 1.0.toFixed;
var floor = Math.floor;

var pow = function (x, n, acc) {
  return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
};

var log = function (x) {
  var n = 0;
  var x2 = x;
  while (x2 >= 4096) {
    n += 12;
    x2 /= 4096;
  }
  while (x2 >= 2) {
    n += 1;
    x2 /= 2;
  } return n;
};

var multiply = function (data, n, c) {
  var index = -1;
  var c2 = c;
  while (++index < 6) {
    c2 += n * data[index];
    data[index] = c2 % 1e7;
    c2 = floor(c2 / 1e7);
  }
};

var divide = function (data, n) {
  var index = 6;
  var c = 0;
  while (--index >= 0) {
    c += data[index];
    data[index] = floor(c / n);
    c = (c % n) * 1e7;
  }
};

var dataToString = function (data) {
  var index = 6;
  var s = '';
  while (--index >= 0) {
    if (s !== '' || index === 0 || data[index] !== 0) {
      var t = String(data[index]);
      s = s === '' ? t : s + repeat.call('0', 7 - t.length) + t;
    }
  } return s;
};

var FORCED = nativeToFixed && (
  0.00008.toFixed(3) !== '0.000' ||
  0.9.toFixed(0) !== '1' ||
  1.255.toFixed(2) !== '1.25' ||
  1000000000000000128.0.toFixed(0) !== '1000000000000000128'
) || !fails(function () {
  // V8 ~ Android 4.3-
  nativeToFixed.call({});
});

// `Number.prototype.toFixed` method
// https://tc39.es/ecma262/#sec-number.prototype.tofixed
$({ target: 'Number', proto: true, forced: FORCED }, {
  toFixed: function toFixed(fractionDigits) {
    var number = thisNumberValue(this);
    var fractDigits = toInteger(fractionDigits);
    var data = [0, 0, 0, 0, 0, 0];
    var sign = '';
    var result = '0';
    var e, z, j, k;

    if (fractDigits < 0 || fractDigits > 20) throw RangeError('Incorrect fraction digits');
    // eslint-disable-next-line no-self-compare -- NaN check
    if (number != number) return 'NaN';
    if (number <= -1e21 || number >= 1e21) return String(number);
    if (number < 0) {
      sign = '-';
      number = -number;
    }
    if (number > 1e-21) {
      e = log(number * pow(2, 69, 1)) - 69;
      z = e < 0 ? number * pow(2, -e, 1) : number / pow(2, e, 1);
      z *= 0x10000000000000;
      e = 52 - e;
      if (e > 0) {
        multiply(data, 0, z);
        j = fractDigits;
        while (j >= 7) {
          multiply(data, 1e7, 0);
          j -= 7;
        }
        multiply(data, pow(10, j, 1), 0);
        j = e - 1;
        while (j >= 23) {
          divide(data, 1 << 23);
          j -= 23;
        }
        divide(data, 1 << j);
        multiply(data, 1, 1);
        divide(data, 2);
        result = dataToString(data);
      } else {
        multiply(data, 0, z);
        multiply(data, 1 << -e, 0);
        result = dataToString(data) + repeat.call('0', fractDigits);
      }
    }
    if (fractDigits > 0) {
      k = result.length;
      result = sign + (k <= fractDigits
        ? '0.' + repeat.call('0', fractDigits - k) + result
        : result.slice(0, k - fractDigits) + '.' + result.slice(k - fractDigits));
    } else {
      result = sign + result;
    } return result;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.object.assign.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/es.object.assign.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var assign = __webpack_require__(/*! ../internals/object-assign */ "./node_modules/core-js/internals/object-assign.js");

// `Object.assign` method
// https://tc39.es/ecma262/#sec-object.assign
// eslint-disable-next-line es/no-object-assign -- required for testing
$({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
  assign: assign
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.object.create.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/es.object.create.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");

// `Object.create` method
// https://tc39.es/ecma262/#sec-object.create
$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
  create: create
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.object.define-properties.js":
/*!*********************************************************************!*\
  !*** ./node_modules/core-js/modules/es.object.define-properties.js ***!
  \*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var defineProperties = __webpack_require__(/*! ../internals/object-define-properties */ "./node_modules/core-js/internals/object-define-properties.js");

// `Object.defineProperties` method
// https://tc39.es/ecma262/#sec-object.defineproperties
$({ target: 'Object', stat: true, forced: !DESCRIPTORS, sham: !DESCRIPTORS }, {
  defineProperties: defineProperties
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.object.define-property.js":
/*!*******************************************************************!*\
  !*** ./node_modules/core-js/modules/es.object.define-property.js ***!
  \*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var objectDefinePropertyModile = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");

// `Object.defineProperty` method
// https://tc39.es/ecma262/#sec-object.defineproperty
$({ target: 'Object', stat: true, forced: !DESCRIPTORS, sham: !DESCRIPTORS }, {
  defineProperty: objectDefinePropertyModile.f
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.object.entries.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es.object.entries.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var $entries = __webpack_require__(/*! ../internals/object-to-array */ "./node_modules/core-js/internals/object-to-array.js").entries;

// `Object.entries` method
// https://tc39.es/ecma262/#sec-object.entries
$({ target: 'Object', stat: true }, {
  entries: function entries(O) {
    return $entries(O);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js":
/*!*******************************************************************************!*\
  !*** ./node_modules/core-js/modules/es.object.get-own-property-descriptor.js ***!
  \*******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
var nativeGetOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");

var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });
var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;

// `Object.getOwnPropertyDescriptor` method
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
  getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
    return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js":
/*!********************************************************************************!*\
  !*** ./node_modules/core-js/modules/es.object.get-own-property-descriptors.js ***!
  \********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "./node_modules/core-js/internals/own-keys.js");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js");
var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");

// `Object.getOwnPropertyDescriptors` method
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
  getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
    var O = toIndexedObject(object);
    var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
    var keys = ownKeys(O);
    var result = {};
    var index = 0;
    var key, descriptor;
    while (keys.length > index) {
      descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);
      if (descriptor !== undefined) createProperty(result, key, descriptor);
    }
    return result;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.object.get-prototype-of.js":
/*!********************************************************************!*\
  !*** ./node_modules/core-js/modules/es.object.get-prototype-of.js ***!
  \********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
var nativeGetPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/core-js/internals/object-get-prototype-of.js");
var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "./node_modules/core-js/internals/correct-prototype-getter.js");

var FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });

// `Object.getPrototypeOf` method
// https://tc39.es/ecma262/#sec-object.getprototypeof
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {
  getPrototypeOf: function getPrototypeOf(it) {
    return nativeGetPrototypeOf(toObject(it));
  }
});



/***/ }),

/***/ "./node_modules/core-js/modules/es.object.keys.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es.object.keys.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
var nativeKeys = __webpack_require__(/*! ../internals/object-keys */ "./node_modules/core-js/internals/object-keys.js");
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");

var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });

// `Object.keys` method
// https://tc39.es/ecma262/#sec-object.keys
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
  keys: function keys(it) {
    return nativeKeys(toObject(it));
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.object.set-prototype-of.js":
/*!********************************************************************!*\
  !*** ./node_modules/core-js/modules/es.object.set-prototype-of.js ***!
  \********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/core-js/internals/object-set-prototype-of.js");

// `Object.setPrototypeOf` method
// https://tc39.es/ecma262/#sec-object.setprototypeof
$({ target: 'Object', stat: true }, {
  setPrototypeOf: setPrototypeOf
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.object.to-string.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/modules/es.object.to-string.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "./node_modules/core-js/internals/to-string-tag-support.js");
var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
var toString = __webpack_require__(/*! ../internals/object-to-string */ "./node_modules/core-js/internals/object-to-string.js");

// `Object.prototype.toString` method
// https://tc39.es/ecma262/#sec-object.prototype.tostring
if (!TO_STRING_TAG_SUPPORT) {
  redefine(Object.prototype, 'toString', toString, { unsafe: true });
}


/***/ }),

/***/ "./node_modules/core-js/modules/es.object.values.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/es.object.values.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var $values = __webpack_require__(/*! ../internals/object-to-array */ "./node_modules/core-js/internals/object-to-array.js").values;

// `Object.values` method
// https://tc39.es/ecma262/#sec-object.values
$({ target: 'Object', stat: true }, {
  values: function values(O) {
    return $values(O);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.parse-float.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es.parse-float.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var parseFloatImplementation = __webpack_require__(/*! ../internals/number-parse-float */ "./node_modules/core-js/internals/number-parse-float.js");

// `parseFloat` method
// https://tc39.es/ecma262/#sec-parsefloat-string
$({ global: true, forced: parseFloat != parseFloatImplementation }, {
  parseFloat: parseFloatImplementation
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.parse-int.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/modules/es.parse-int.js ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var parseIntImplementation = __webpack_require__(/*! ../internals/number-parse-int */ "./node_modules/core-js/internals/number-parse-int.js");

// `parseInt` method
// https://tc39.es/ecma262/#sec-parseint-string-radix
$({ global: true, forced: parseInt != parseIntImplementation }, {
  parseInt: parseIntImplementation
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.reflect.construct.js":
/*!**************************************************************!*\
  !*** ./node_modules/core-js/modules/es.reflect.construct.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
var bind = __webpack_require__(/*! ../internals/function-bind */ "./node_modules/core-js/internals/function-bind.js");
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");

var nativeConstruct = getBuiltIn('Reflect', 'construct');

// `Reflect.construct` method
// https://tc39.es/ecma262/#sec-reflect.construct
// MS Edge supports only 2 arguments and argumentsList argument is optional
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
var NEW_TARGET_BUG = fails(function () {
  function F() { /* empty */ }
  return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);
});
var ARGS_BUG = !fails(function () {
  nativeConstruct(function () { /* empty */ });
});
var FORCED = NEW_TARGET_BUG || ARGS_BUG;

$({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {
  construct: function construct(Target, args /* , newTarget */) {
    aFunction(Target);
    anObject(args);
    var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
    if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);
    if (Target == newTarget) {
      // w/o altered newTarget, optimization for 0-4 arguments
      switch (args.length) {
        case 0: return new Target();
        case 1: return new Target(args[0]);
        case 2: return new Target(args[0], args[1]);
        case 3: return new Target(args[0], args[1], args[2]);
        case 4: return new Target(args[0], args[1], args[2], args[3]);
      }
      // w/o altered newTarget, lot of arguments case
      var $args = [null];
      $args.push.apply($args, args);
      return new (bind.apply(Target, $args))();
    }
    // with altered newTarget, not support built-in constructors
    var proto = newTarget.prototype;
    var instance = create(isObject(proto) ? proto : Object.prototype);
    var result = Function.apply.call(Target, instance, args);
    return isObject(result) ? result : instance;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.reflect.get.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es.reflect.get.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js");
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/core-js/internals/object-get-prototype-of.js");

// `Reflect.get` method
// https://tc39.es/ecma262/#sec-reflect.get
function get(target, propertyKey /* , receiver */) {
  var receiver = arguments.length < 3 ? target : arguments[2];
  var descriptor, prototype;
  if (anObject(target) === receiver) return target[propertyKey];
  if (descriptor = getOwnPropertyDescriptorModule.f(target, propertyKey)) return has(descriptor, 'value')
    ? descriptor.value
    : descriptor.get === undefined
      ? undefined
      : descriptor.get.call(receiver);
  if (isObject(prototype = getPrototypeOf(target))) return get(prototype, propertyKey, receiver);
}

$({ target: 'Reflect', stat: true }, {
  get: get
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.regexp.constructor.js":
/*!***************************************************************!*\
  !*** ./node_modules/core-js/modules/es.regexp.constructor.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js");
var inheritIfRequired = __webpack_require__(/*! ../internals/inherit-if-required */ "./node_modules/core-js/internals/inherit-if-required.js");
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
var getOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js").f;
var isRegExp = __webpack_require__(/*! ../internals/is-regexp */ "./node_modules/core-js/internals/is-regexp.js");
var getFlags = __webpack_require__(/*! ../internals/regexp-flags */ "./node_modules/core-js/internals/regexp-flags.js");
var stickyHelpers = __webpack_require__(/*! ../internals/regexp-sticky-helpers */ "./node_modules/core-js/internals/regexp-sticky-helpers.js");
var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
var enforceInternalState = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js").enforce;
var setSpecies = __webpack_require__(/*! ../internals/set-species */ "./node_modules/core-js/internals/set-species.js");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");

var MATCH = wellKnownSymbol('match');
var NativeRegExp = global.RegExp;
var RegExpPrototype = NativeRegExp.prototype;
var re1 = /a/g;
var re2 = /a/g;

// "new" should create a new object, old webkit bug
var CORRECT_NEW = new NativeRegExp(re1) !== re1;

var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;

var FORCED = DESCRIPTORS && isForced('RegExp', (!CORRECT_NEW || UNSUPPORTED_Y || fails(function () {
  re2[MATCH] = false;
  // RegExp constructor can alter flags and IsRegExp works correct with @@match
  return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';
})));

// `RegExp` constructor
// https://tc39.es/ecma262/#sec-regexp-constructor
if (FORCED) {
  var RegExpWrapper = function RegExp(pattern, flags) {
    var thisIsRegExp = this instanceof RegExpWrapper;
    var patternIsRegExp = isRegExp(pattern);
    var flagsAreUndefined = flags === undefined;
    var sticky;

    if (!thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined) {
      return pattern;
    }

    if (CORRECT_NEW) {
      if (patternIsRegExp && !flagsAreUndefined) pattern = pattern.source;
    } else if (pattern instanceof RegExpWrapper) {
      if (flagsAreUndefined) flags = getFlags.call(pattern);
      pattern = pattern.source;
    }

    if (UNSUPPORTED_Y) {
      sticky = !!flags && flags.indexOf('y') > -1;
      if (sticky) flags = flags.replace(/y/g, '');
    }

    var result = inheritIfRequired(
      CORRECT_NEW ? new NativeRegExp(pattern, flags) : NativeRegExp(pattern, flags),
      thisIsRegExp ? this : RegExpPrototype,
      RegExpWrapper
    );

    if (UNSUPPORTED_Y && sticky) {
      var state = enforceInternalState(result);
      state.sticky = true;
    }

    return result;
  };
  var proxy = function (key) {
    key in RegExpWrapper || defineProperty(RegExpWrapper, key, {
      configurable: true,
      get: function () { return NativeRegExp[key]; },
      set: function (it) { NativeRegExp[key] = it; }
    });
  };
  var keys = getOwnPropertyNames(NativeRegExp);
  var index = 0;
  while (keys.length > index) proxy(keys[index++]);
  RegExpPrototype.constructor = RegExpWrapper;
  RegExpWrapper.prototype = RegExpPrototype;
  redefine(global, 'RegExp', RegExpWrapper);
}

// https://tc39.es/ecma262/#sec-get-regexp-@@species
setSpecies('RegExp');


/***/ }),

/***/ "./node_modules/core-js/modules/es.regexp.exec.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es.regexp.exec.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var exec = __webpack_require__(/*! ../internals/regexp-exec */ "./node_modules/core-js/internals/regexp-exec.js");

// `RegExp.prototype.exec` method
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
  exec: exec
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.regexp.to-string.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/modules/es.regexp.to-string.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
var flags = __webpack_require__(/*! ../internals/regexp-flags */ "./node_modules/core-js/internals/regexp-flags.js");

var TO_STRING = 'toString';
var RegExpPrototype = RegExp.prototype;
var nativeToString = RegExpPrototype[TO_STRING];

var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
// FF44- RegExp#toString has a wrong name
var INCORRECT_NAME = nativeToString.name != TO_STRING;

// `RegExp.prototype.toString` method
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
if (NOT_GENERIC || INCORRECT_NAME) {
  redefine(RegExp.prototype, TO_STRING, function toString() {
    var R = anObject(this);
    var p = String(R.source);
    var rf = R.flags;
    var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);
    return '/' + p + '/' + f;
  }, { unsafe: true });
}


/***/ }),

/***/ "./node_modules/core-js/modules/es.string.includes.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/es.string.includes.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ "./node_modules/core-js/internals/not-a-regexp.js");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
var correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ "./node_modules/core-js/internals/correct-is-regexp-logic.js");

// `String.prototype.includes` method
// https://tc39.es/ecma262/#sec-string.prototype.includes
$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
  includes: function includes(searchString /* , position = 0 */) {
    return !!~String(requireObjectCoercible(this))
      .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.string.iterator.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/es.string.iterator.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var charAt = __webpack_require__(/*! ../internals/string-multibyte */ "./node_modules/core-js/internals/string-multibyte.js").charAt;
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "./node_modules/core-js/internals/define-iterator.js");

var STRING_ITERATOR = 'String Iterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);

// `String.prototype[@@iterator]` method
// https://tc39.es/ecma262/#sec-string.prototype-@@iterator
defineIterator(String, 'String', function (iterated) {
  setInternalState(this, {
    type: STRING_ITERATOR,
    string: String(iterated),
    index: 0
  });
// `%StringIteratorPrototype%.next` method
// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
}, function next() {
  var state = getInternalState(this);
  var string = state.string;
  var index = state.index;
  var point;
  if (index >= string.length) return { value: undefined, done: true };
  point = charAt(string, index);
  state.index += point.length;
  return { value: point, done: false };
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.string.match.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es.string.match.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js");
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "./node_modules/core-js/internals/advance-string-index.js");
var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "./node_modules/core-js/internals/regexp-exec-abstract.js");

// @@match logic
fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
  return [
    // `String.prototype.match` method
    // https://tc39.es/ecma262/#sec-string.prototype.match
    function match(regexp) {
      var O = requireObjectCoercible(this);
      var matcher = regexp == undefined ? undefined : regexp[MATCH];
      return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
    },
    // `RegExp.prototype[@@match]` method
    // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
    function (regexp) {
      var res = maybeCallNative(nativeMatch, regexp, this);
      if (res.done) return res.value;

      var rx = anObject(regexp);
      var S = String(this);

      if (!rx.global) return regExpExec(rx, S);

      var fullUnicode = rx.unicode;
      rx.lastIndex = 0;
      var A = [];
      var n = 0;
      var result;
      while ((result = regExpExec(rx, S)) !== null) {
        var matchStr = String(result[0]);
        A[n] = matchStr;
        if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
        n++;
      }
      return n === 0 ? null : A;
    }
  ];
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.string.replace.js":
/*!***********************************************************!*\
  !*** ./node_modules/core-js/modules/es.string.replace.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js");
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "./node_modules/core-js/internals/to-integer.js");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "./node_modules/core-js/internals/advance-string-index.js");
var getSubstitution = __webpack_require__(/*! ../internals/get-substitution */ "./node_modules/core-js/internals/get-substitution.js");
var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "./node_modules/core-js/internals/regexp-exec-abstract.js");

var max = Math.max;
var min = Math.min;

var maybeToString = function (it) {
  return it === undefined ? it : String(it);
};

// @@replace logic
fixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
  var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
  var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
  var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';

  return [
    // `String.prototype.replace` method
    // https://tc39.es/ecma262/#sec-string.prototype.replace
    function replace(searchValue, replaceValue) {
      var O = requireObjectCoercible(this);
      var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
      return replacer !== undefined
        ? replacer.call(searchValue, O, replaceValue)
        : nativeReplace.call(String(O), searchValue, replaceValue);
    },
    // `RegExp.prototype[@@replace]` method
    // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
    function (regexp, replaceValue) {
      if (
        (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
        (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
      ) {
        var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
        if (res.done) return res.value;
      }

      var rx = anObject(regexp);
      var S = String(this);

      var functionalReplace = typeof replaceValue === 'function';
      if (!functionalReplace) replaceValue = String(replaceValue);

      var global = rx.global;
      if (global) {
        var fullUnicode = rx.unicode;
        rx.lastIndex = 0;
      }
      var results = [];
      while (true) {
        var result = regExpExec(rx, S);
        if (result === null) break;

        results.push(result);
        if (!global) break;

        var matchStr = String(result[0]);
        if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
      }

      var accumulatedResult = '';
      var nextSourcePosition = 0;
      for (var i = 0; i < results.length; i++) {
        result = results[i];

        var matched = String(result[0]);
        var position = max(min(toInteger(result.index), S.length), 0);
        var captures = [];
        // NOTE: This is equivalent to
        //   captures = result.slice(1).map(maybeToString)
        // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
        // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
        // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
        for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
        var namedCaptures = result.groups;
        if (functionalReplace) {
          var replacerArgs = [matched].concat(captures, position, S);
          if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
          var replacement = String(replaceValue.apply(undefined, replacerArgs));
        } else {
          replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
        }
        if (position >= nextSourcePosition) {
          accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
          nextSourcePosition = position + matched.length;
        }
      }
      return accumulatedResult + S.slice(nextSourcePosition);
    }
  ];
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.string.split.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/modules/es.string.split.js ***!
  \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js");
var isRegExp = __webpack_require__(/*! ../internals/is-regexp */ "./node_modules/core-js/internals/is-regexp.js");
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "./node_modules/core-js/internals/species-constructor.js");
var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "./node_modules/core-js/internals/advance-string-index.js");
var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
var callRegExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "./node_modules/core-js/internals/regexp-exec-abstract.js");
var regexpExec = __webpack_require__(/*! ../internals/regexp-exec */ "./node_modules/core-js/internals/regexp-exec.js");
var stickyHelpers = __webpack_require__(/*! ../internals/regexp-sticky-helpers */ "./node_modules/core-js/internals/regexp-sticky-helpers.js");

var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
var arrayPush = [].push;
var min = Math.min;
var MAX_UINT32 = 0xFFFFFFFF;

// @@split logic
fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
  var internalSplit;
  if (
    'abbc'.split(/(b)*/)[1] == 'c' ||
    // eslint-disable-next-line regexp/no-empty-group -- required for testing
    'test'.split(/(?:)/, -1).length != 4 ||
    'ab'.split(/(?:ab)*/).length != 2 ||
    '.'.split(/(.?)(.?)/).length != 4 ||
    // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
    '.'.split(/()()/).length > 1 ||
    ''.split(/.?/).length
  ) {
    // based on es5-shim implementation, need to rework it
    internalSplit = function (separator, limit) {
      var string = String(requireObjectCoercible(this));
      var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
      if (lim === 0) return [];
      if (separator === undefined) return [string];
      // If `separator` is not a regex, use native split
      if (!isRegExp(separator)) {
        return nativeSplit.call(string, separator, lim);
      }
      var output = [];
      var flags = (separator.ignoreCase ? 'i' : '') +
                  (separator.multiline ? 'm' : '') +
                  (separator.unicode ? 'u' : '') +
                  (separator.sticky ? 'y' : '');
      var lastLastIndex = 0;
      // Make `global` and avoid `lastIndex` issues by working with a copy
      var separatorCopy = new RegExp(separator.source, flags + 'g');
      var match, lastIndex, lastLength;
      while (match = regexpExec.call(separatorCopy, string)) {
        lastIndex = separatorCopy.lastIndex;
        if (lastIndex > lastLastIndex) {
          output.push(string.slice(lastLastIndex, match.index));
          if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
          lastLength = match[0].length;
          lastLastIndex = lastIndex;
          if (output.length >= lim) break;
        }
        if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
      }
      if (lastLastIndex === string.length) {
        if (lastLength || !separatorCopy.test('')) output.push('');
      } else output.push(string.slice(lastLastIndex));
      return output.length > lim ? output.slice(0, lim) : output;
    };
  // Chakra, V8
  } else if ('0'.split(undefined, 0).length) {
    internalSplit = function (separator, limit) {
      return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
    };
  } else internalSplit = nativeSplit;

  return [
    // `String.prototype.split` method
    // https://tc39.es/ecma262/#sec-string.prototype.split
    function split(separator, limit) {
      var O = requireObjectCoercible(this);
      var splitter = separator == undefined ? undefined : separator[SPLIT];
      return splitter !== undefined
        ? splitter.call(separator, O, limit)
        : internalSplit.call(String(O), separator, limit);
    },
    // `RegExp.prototype[@@split]` method
    // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
    //
    // NOTE: This cannot be properly polyfilled in engines that don't support
    // the 'y' flag.
    function (regexp, limit) {
      var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);
      if (res.done) return res.value;

      var rx = anObject(regexp);
      var S = String(this);
      var C = speciesConstructor(rx, RegExp);

      var unicodeMatching = rx.unicode;
      var flags = (rx.ignoreCase ? 'i' : '') +
                  (rx.multiline ? 'm' : '') +
                  (rx.unicode ? 'u' : '') +
                  (UNSUPPORTED_Y ? 'g' : 'y');

      // ^(? + rx + ) is needed, in combination with some S slicing, to
      // simulate the 'y' flag.
      var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
      var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
      if (lim === 0) return [];
      if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
      var p = 0;
      var q = 0;
      var A = [];
      while (q < S.length) {
        splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
        var z = callRegExpExec(splitter, UNSUPPORTED_Y ? S.slice(q) : S);
        var e;
        if (
          z === null ||
          (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p
        ) {
          q = advanceStringIndex(S, q, unicodeMatching);
        } else {
          A.push(S.slice(p, q));
          if (A.length === lim) return A;
          for (var i = 1; i <= z.length - 1; i++) {
            A.push(z[i]);
            if (A.length === lim) return A;
          }
          q = p = e;
        }
      }
      A.push(S.slice(p));
      return A;
    }
  ];
}, UNSUPPORTED_Y);


/***/ }),

/***/ "./node_modules/core-js/modules/es.string.starts-with.js":
/*!***************************************************************!*\
  !*** ./node_modules/core-js/modules/es.string.starts-with.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
var notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ "./node_modules/core-js/internals/not-a-regexp.js");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
var correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ "./node_modules/core-js/internals/correct-is-regexp-logic.js");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");

// eslint-disable-next-line es/no-string-prototype-startswith -- safe
var $startsWith = ''.startsWith;
var min = Math.min;

var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
// https://github.com/zloirock/core-js/pull/702
var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {
  var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
  return descriptor && !descriptor.writable;
}();

// `String.prototype.startsWith` method
// https://tc39.es/ecma262/#sec-string.prototype.startswith
$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
  startsWith: function startsWith(searchString /* , position = 0 */) {
    var that = String(requireObjectCoercible(this));
    notARegExp(searchString);
    var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
    var search = String(searchString);
    return $startsWith
      ? $startsWith.call(that, search, index)
      : that.slice(index, index + search.length) === search;
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.string.trim.js":
/*!********************************************************!*\
  !*** ./node_modules/core-js/modules/es.string.trim.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var $trim = __webpack_require__(/*! ../internals/string-trim */ "./node_modules/core-js/internals/string-trim.js").trim;
var forcedStringTrimMethod = __webpack_require__(/*! ../internals/string-trim-forced */ "./node_modules/core-js/internals/string-trim-forced.js");

// `String.prototype.trim` method
// https://tc39.es/ecma262/#sec-string.prototype.trim
$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
  trim: function trim() {
    return $trim(this);
  }
});


/***/ }),

/***/ "./node_modules/core-js/modules/es.symbol.description.js":
/*!***************************************************************!*\
  !*** ./node_modules/core-js/modules/es.symbol.description.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
// `Symbol.prototype.description` getter
// https://tc39.es/ecma262/#sec-symbol.prototype.description

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ "./node_modules/core-js/internals/copy-constructor-properties.js");

var NativeSymbol = global.Symbol;

if (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||
  // Safari 12 bug
  NativeSymbol().description !== undefined
)) {
  var EmptyStringDescriptionStore = {};
  // wrap Symbol constructor for correct work with undefined description
  var SymbolWrapper = function Symbol() {
    var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);
    var result = this instanceof SymbolWrapper
      ? new NativeSymbol(description)
      // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
      : description === undefined ? NativeSymbol() : NativeSymbol(description);
    if (description === '') EmptyStringDescriptionStore[result] = true;
    return result;
  };
  copyConstructorProperties(SymbolWrapper, NativeSymbol);
  var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;
  symbolPrototype.constructor = SymbolWrapper;

  var symbolToString = symbolPrototype.toString;
  var native = String(NativeSymbol('test')) == 'Symbol(test)';
  var regexp = /^Symbol\((.*)\)[^)]+$/;
  defineProperty(symbolPrototype, 'description', {
    configurable: true,
    get: function description() {
      var symbol = isObject(this) ? this.valueOf() : this;
      var string = symbolToString.call(symbol);
      if (has(EmptyStringDescriptionStore, symbol)) return '';
      var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');
      return desc === '' ? undefined : desc;
    }
  });

  $({ global: true, forced: true }, {
    Symbol: SymbolWrapper
  });
}


/***/ }),

/***/ "./node_modules/core-js/modules/es.symbol.iterator.js":
/*!************************************************************!*\
  !*** ./node_modules/core-js/modules/es.symbol.iterator.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "./node_modules/core-js/internals/define-well-known-symbol.js");

// `Symbol.iterator` well-known symbol
// https://tc39.es/ecma262/#sec-symbol.iterator
defineWellKnownSymbol('iterator');


/***/ }),

/***/ "./node_modules/core-js/modules/es.symbol.js":
/*!***************************************************!*\
  !*** ./node_modules/core-js/modules/es.symbol.js ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "./node_modules/core-js/internals/native-symbol.js");
var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ "./node_modules/core-js/internals/use-symbol-as-uid.js");
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
var nativeObjectCreate = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "./node_modules/core-js/internals/object-keys.js");
var getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js");
var getOwnPropertyNamesExternal = __webpack_require__(/*! ../internals/object-get-own-property-names-external */ "./node_modules/core-js/internals/object-get-own-property-names-external.js");
var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "./node_modules/core-js/internals/object-get-own-property-symbols.js");
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "./node_modules/core-js/internals/object-property-is-enumerable.js");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
var shared = __webpack_require__(/*! ../internals/shared */ "./node_modules/core-js/internals/shared.js");
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js");
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");
var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
var wrappedWellKnownSymbolModule = __webpack_require__(/*! ../internals/well-known-symbol-wrapped */ "./node_modules/core-js/internals/well-known-symbol-wrapped.js");
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "./node_modules/core-js/internals/define-well-known-symbol.js");
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
var $forEach = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").forEach;

var HIDDEN = sharedKey('hidden');
var SYMBOL = 'Symbol';
var PROTOTYPE = 'prototype';
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(SYMBOL);
var ObjectPrototype = Object[PROTOTYPE];
var $Symbol = global.Symbol;
var $stringify = getBuiltIn('JSON', 'stringify');
var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
var nativeDefineProperty = definePropertyModule.f;
var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;
var nativePropertyIsEnumerable = propertyIsEnumerableModule.f;
var AllSymbols = shared('symbols');
var ObjectPrototypeSymbols = shared('op-symbols');
var StringToSymbolRegistry = shared('string-to-symbol-registry');
var SymbolToStringRegistry = shared('symbol-to-string-registry');
var WellKnownSymbolsStore = shared('wks');
var QObject = global.QObject;
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;

// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
var setSymbolDescriptor = DESCRIPTORS && fails(function () {
  return nativeObjectCreate(nativeDefineProperty({}, 'a', {
    get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }
  })).a != 7;
}) ? function (O, P, Attributes) {
  var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);
  if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
  nativeDefineProperty(O, P, Attributes);
  if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
    nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);
  }
} : nativeDefineProperty;

var wrap = function (tag, description) {
  var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);
  setInternalState(symbol, {
    type: SYMBOL,
    tag: tag,
    description: description
  });
  if (!DESCRIPTORS) symbol.description = description;
  return symbol;
};

var isSymbol = USE_SYMBOL_AS_UID ? function (it) {
  return typeof it == 'symbol';
} : function (it) {
  return Object(it) instanceof $Symbol;
};

var $defineProperty = function defineProperty(O, P, Attributes) {
  if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
  anObject(O);
  var key = toPrimitive(P, true);
  anObject(Attributes);
  if (has(AllSymbols, key)) {
    if (!Attributes.enumerable) {
      if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));
      O[HIDDEN][key] = true;
    } else {
      if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
      Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
    } return setSymbolDescriptor(O, key, Attributes);
  } return nativeDefineProperty(O, key, Attributes);
};

var $defineProperties = function defineProperties(O, Properties) {
  anObject(O);
  var properties = toIndexedObject(Properties);
  var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
  $forEach(keys, function (key) {
    if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);
  });
  return O;
};

var $create = function create(O, Properties) {
  return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);
};

var $propertyIsEnumerable = function propertyIsEnumerable(V) {
  var P = toPrimitive(V, true);
  var enumerable = nativePropertyIsEnumerable.call(this, P);
  if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;
  return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;
};

var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
  var it = toIndexedObject(O);
  var key = toPrimitive(P, true);
  if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;
  var descriptor = nativeGetOwnPropertyDescriptor(it, key);
  if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {
    descriptor.enumerable = true;
  }
  return descriptor;
};

var $getOwnPropertyNames = function getOwnPropertyNames(O) {
  var names = nativeGetOwnPropertyNames(toIndexedObject(O));
  var result = [];
  $forEach(names, function (key) {
    if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);
  });
  return result;
};

var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
  var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
  var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
  var result = [];
  $forEach(names, function (key) {
    if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {
      result.push(AllSymbols[key]);
    }
  });
  return result;
};

// `Symbol` constructor
// https://tc39.es/ecma262/#sec-symbol-constructor
if (!NATIVE_SYMBOL) {
  $Symbol = function Symbol() {
    if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
    var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);
    var tag = uid(description);
    var setter = function (value) {
      if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);
      if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
      setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
    };
    if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
    return wrap(tag, description);
  };

  redefine($Symbol[PROTOTYPE], 'toString', function toString() {
    return getInternalState(this).tag;
  });

  redefine($Symbol, 'withoutSetter', function (description) {
    return wrap(uid(description), description);
  });

  propertyIsEnumerableModule.f = $propertyIsEnumerable;
  definePropertyModule.f = $defineProperty;
  getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;
  getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;
  getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;

  wrappedWellKnownSymbolModule.f = function (name) {
    return wrap(wellKnownSymbol(name), name);
  };

  if (DESCRIPTORS) {
    // https://github.com/tc39/proposal-Symbol-description
    nativeDefineProperty($Symbol[PROTOTYPE], 'description', {
      configurable: true,
      get: function description() {
        return getInternalState(this).description;
      }
    });
    if (!IS_PURE) {
      redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
    }
  }
}

$({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {
  Symbol: $Symbol
});

$forEach(objectKeys(WellKnownSymbolsStore), function (name) {
  defineWellKnownSymbol(name);
});

$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {
  // `Symbol.for` method
  // https://tc39.es/ecma262/#sec-symbol.for
  'for': function (key) {
    var string = String(key);
    if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
    var symbol = $Symbol(string);
    StringToSymbolRegistry[string] = symbol;
    SymbolToStringRegistry[symbol] = string;
    return symbol;
  },
  // `Symbol.keyFor` method
  // https://tc39.es/ecma262/#sec-symbol.keyfor
  keyFor: function keyFor(sym) {
    if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
    if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
  },
  useSetter: function () { USE_SETTER = true; },
  useSimple: function () { USE_SETTER = false; }
});

$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {
  // `Object.create` method
  // https://tc39.es/ecma262/#sec-object.create
  create: $create,
  // `Object.defineProperty` method
  // https://tc39.es/ecma262/#sec-object.defineproperty
  defineProperty: $defineProperty,
  // `Object.defineProperties` method
  // https://tc39.es/ecma262/#sec-object.defineproperties
  defineProperties: $defineProperties,
  // `Object.getOwnPropertyDescriptor` method
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
  getOwnPropertyDescriptor: $getOwnPropertyDescriptor
});

$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {
  // `Object.getOwnPropertyNames` method
  // https://tc39.es/ecma262/#sec-object.getownpropertynames
  getOwnPropertyNames: $getOwnPropertyNames,
  // `Object.getOwnPropertySymbols` method
  // https://tc39.es/ecma262/#sec-object.getownpropertysymbols
  getOwnPropertySymbols: $getOwnPropertySymbols
});

// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
// https://bugs.chromium.org/p/v8/issues/detail?id=3443
$({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {
  getOwnPropertySymbols: function getOwnPropertySymbols(it) {
    return getOwnPropertySymbolsModule.f(toObject(it));
  }
});

// `JSON.stringify` method behavior with symbols
// https://tc39.es/ecma262/#sec-json.stringify
if ($stringify) {
  var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {
    var symbol = $Symbol();
    // MS Edge converts symbol values to JSON as {}
    return $stringify([symbol]) != '[null]'
      // WebKit converts symbol values to JSON as null
      || $stringify({ a: symbol }) != '{}'
      // V8 throws on boxed symbols
      || $stringify(Object(symbol)) != '{}';
  });

  $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
    // eslint-disable-next-line no-unused-vars -- required for `.length`
    stringify: function stringify(it, replacer, space) {
      var args = [it];
      var index = 1;
      var $replacer;
      while (arguments.length > index) args.push(arguments[index++]);
      $replacer = replacer;
      if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
      if (!isArray(replacer)) replacer = function (key, value) {
        if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
        if (!isSymbol(value)) return value;
      };
      args[1] = replacer;
      return $stringify.apply(null, args);
    }
  });
}

// `Symbol.prototype[@@toPrimitive]` method
// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
if (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {
  createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
}
// `Symbol.prototype[@@toStringTag]` property
// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag
setToStringTag($Symbol, SYMBOL);

hiddenKeys[HIDDEN] = true;


/***/ }),

/***/ "./node_modules/core-js/modules/web.dom-collections.for-each.js":
/*!**********************************************************************!*\
  !*** ./node_modules/core-js/modules/web.dom-collections.for-each.js ***!
  \**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ "./node_modules/core-js/internals/dom-iterables.js");
var forEach = __webpack_require__(/*! ../internals/array-for-each */ "./node_modules/core-js/internals/array-for-each.js");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");

for (var COLLECTION_NAME in DOMIterables) {
  var Collection = global[COLLECTION_NAME];
  var CollectionPrototype = Collection && Collection.prototype;
  // some Chrome versions have non-configurable methods on DOMTokenList
  if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
    createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
  } catch (error) {
    CollectionPrototype.forEach = forEach;
  }
}


/***/ }),

/***/ "./node_modules/core-js/modules/web.dom-collections.iterator.js":
/*!**********************************************************************!*\
  !*** ./node_modules/core-js/modules/web.dom-collections.iterator.js ***!
  \**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ "./node_modules/core-js/internals/dom-iterables.js");
var ArrayIteratorMethods = __webpack_require__(/*! ../modules/es.array.iterator */ "./node_modules/core-js/modules/es.array.iterator.js");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");

var ITERATOR = wellKnownSymbol('iterator');
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var ArrayValues = ArrayIteratorMethods.values;

for (var COLLECTION_NAME in DOMIterables) {
  var Collection = global[COLLECTION_NAME];
  var CollectionPrototype = Collection && Collection.prototype;
  if (CollectionPrototype) {
    // some Chrome versions have non-configurable methods on DOMTokenList
    if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
      createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
    } catch (error) {
      CollectionPrototype[ITERATOR] = ArrayValues;
    }
    if (!CollectionPrototype[TO_STRING_TAG]) {
      createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
    }
    if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
      // some Chrome versions have non-configurable methods on DOMTokenList
      if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
        createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
      } catch (error) {
        CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
      }
    }
  }
}


/***/ }),

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

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "./node_modules/core-js/internals/engine-user-agent.js");

var slice = [].slice;
var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check

var wrap = function (scheduler) {
  return function (handler, timeout /* , ...arguments */) {
    var boundArgs = arguments.length > 2;
    var args = boundArgs ? slice.call(arguments, 2) : undefined;
    return scheduler(boundArgs ? function () {
      // eslint-disable-next-line no-new-func -- spec requirement
      (typeof handler == 'function' ? handler : Function(handler)).apply(this, args);
    } : handler, timeout);
  };
};

// ie9- setTimeout & setInterval additional parameters fix
// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers
$({ global: true, bind: true, forced: MSIE }, {
  // `setTimeout` method
  // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout
  setTimeout: wrap(global.setTimeout),
  // `setInterval` method
  // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval
  setInterval: wrap(global.setInterval)
});


/***/ }),

/***/ "./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;


/***/ }),

/***/ "./src/core.js":
/*!*********************!*\
  !*** ./src/core.js ***!
  \*********************/
/*! exports provided: JSONEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JSONEditor", function() { return JSONEditor; });
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.date.to-string.js */ "./node_modules/core-js/modules/es.date.to-string.js");
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ "./node_modules/core-js/modules/es.regexp.to-string.js");
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array.reduce.js */ "./node_modules/core-js/modules/es.array.reduce.js");
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.values.js */ "./node_modules/core-js/modules/es.object.values.js");
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.find.js */ "./node_modules/core-js/modules/es.array.find.js");
/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.assign.js */ "./node_modules/core-js/modules/es.object.assign.js");
/* harmony import */ var core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ "./node_modules/core-js/modules/es.array.is-array.js");
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js");
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_19__);
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_20__);
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_21__);
/* harmony import */ var _defaults_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./defaults.js */ "./src/defaults.js");
/* harmony import */ var _validator_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./validator.js */ "./src/validator.js");
/* harmony import */ var _schemaloader_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./schemaloader.js */ "./src/schemaloader.js");
/* harmony import */ var _editors_index_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./editors/index.js */ "./src/editors/index.js");
/* harmony import */ var _templates_index_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./templates/index.js */ "./src/templates/index.js");
/* harmony import */ var _iconlibs_index_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./iconlibs/index.js */ "./src/iconlibs/index.js");
/* harmony import */ var _themes_index_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./themes/index.js */ "./src/themes/index.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./utilities.js */ "./src/utilities.js");
/* harmony import */ var _editor__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./editor */ "./src/editor.js");
/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./theme */ "./src/theme.js");
/* harmony import */ var _iconlib__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./iconlib */ "./src/iconlib.js");
/* harmony import */ var _style_css_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./style.css.js */ "./src/style.css.js");
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }

function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }

function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
























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); return Constructor; }













var JSONEditor = /*#__PURE__*/function () {
  function JSONEditor(element) {
    var _this = this;

    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

    _classCallCheck(this, JSONEditor);

    if (!(element instanceof Element)) throw new Error('element should be an instance of Element');
    this.element = element;
    this.options = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_29__["extend"])({}, JSONEditor.defaults.options, options);
    this.ready = false;
    this.copyClipboard = null;
    this.schema = this.options.schema;
    this.template = this.options.template;
    this.translate = this.options.translate || JSONEditor.defaults.translate;
    this.translateProperty = this.options.translateProperty || JSONEditor.defaults.translateProperty;
    this.uuid = 0;
    this.__data = {};
    var themeName = this.options.theme || JSONEditor.defaults.theme;
    var themeClass = JSONEditor.defaults.themes[themeName];
    /* Load editors and selected theme style rules */

    if (!themeClass) throw new Error("Unknown theme ".concat(themeName));
    this.element.setAttribute('data-theme', themeName); // eslint-disable-next-line new-cap

    this.theme = new themeClass(this);
    var rules = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_29__["extend"])(_style_css_js__WEBPACK_IMPORTED_MODULE_33__["default"], this.getEditorsRules());
    /* Call addNewStyleRulesToShadowRoot if shadowRoot is found, otherwise call addNewStyleRules */

    var addRules = function addRules(themeName, rules, shadowRoot) {
      return shadowRoot ? _this.addNewStyleRulesToShadowRoot(themeName, rules, shadowRoot) : _this.addNewStyleRules(themeName, rules);
    };

    if (!this.theme.options.disable_theme_rules) {
      /* Attempt to locate a shadowRoot parent (i.e. in Web Components) */
      var shadowRoot = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_29__["getShadowParent"])(this.element);
      addRules('default', rules, shadowRoot);

      if (typeof themeClass.rules !== 'undefined') {
        addRules(themeName, themeClass.rules, shadowRoot);
      }
    }
    /* Init icon class */


    var iconClass = JSONEditor.defaults.iconlibs[this.options.iconlib || JSONEditor.defaults.iconlib]; // eslint-disable-next-line new-cap

    if (iconClass) this.iconlib = new iconClass();
    this.root_container = this.theme.getContainer();
    this.element.appendChild(this.root_container);
    /* Fetch all external refs via ajax */

    var fetchUrl = document.location.origin + document.location.pathname.toString();
    var loader = new _schemaloader_js__WEBPACK_IMPORTED_MODULE_24__["SchemaLoader"](this.options);
    var location = document.location.toString();

    this.expandSchema = function (schema, fileBase) {
      return loader.expandSchema(schema, fileBase);
    };

    this.expandRefs = function (schema, fileBase) {
      return loader.expandRefs(schema, fileBase);
    };

    this.refs = loader.refs;
    loader.load(this.schema, function (schema) {
      var validatorOptions = _this.options.custom_validators ? {
        custom_validators: _this.options.custom_validators
      } : {};
      _this.validator = new _validator_js__WEBPACK_IMPORTED_MODULE_23__["Validator"](_this, null, validatorOptions, JSONEditor.defaults);

      var editorClass = _this.getEditorClass(schema);

      _this.root = _this.createEditor(editorClass, {
        jsoneditor: _this,
        schema: schema,
        required: true,
        container: _this.root_container
      });

      _this.root.preBuild();

      _this.root.build();

      _this.root.postBuild();
      /* Starting data */


      if (Object(_utilities_js__WEBPACK_IMPORTED_MODULE_29__["hasOwnProperty"])(_this.options, 'startval')) _this.root.setValue(_this.options.startval);
      _this.validation_results = _this.validator.validate(_this.root.getValue());

      _this.root.showValidationErrors(_this.validation_results);

      _this.ready = true;
      /* Fire ready event asynchronously */

      window.requestAnimationFrame(function () {
        if (!_this.ready) return;
        _this.validation_results = _this.validator.validate(_this.root.getValue());

        _this.root.showValidationErrors(_this.validation_results);

        _this.trigger('ready');

        _this.trigger('change');
      });
    }, fetchUrl, location);
  }

  _createClass(JSONEditor, [{
    key: "getValue",
    value: function getValue() {
      if (!this.ready) throw new Error("JSON Editor not ready yet.  Listen for 'ready' event before getting the value");
      return this.root.getValue();
    }
  }, {
    key: "setValue",
    value: function setValue(value) {
      if (!this.ready) throw new Error("JSON Editor not ready yet.  Listen for 'ready' event before setting the value");
      this.root.setValue(value);
      return this;
    }
  }, {
    key: "validate",
    value: function validate(value) {
      if (!this.ready) throw new Error("JSON Editor not ready yet.  Listen for 'ready' event before validating");
      /* Custom value */

      if (arguments.length === 1) {
        return this.validator.validate(value);
        /* Current value (use cached result) */
      } else {
        return this.validation_results;
      }
    }
  }, {
    key: "destroy",
    value: function destroy() {
      if (this.destroyed) return;
      if (!this.ready) return;
      this.schema = null;
      this.options = null;
      this.root.destroy();
      this.root = null;
      this.root_container = null;
      this.validator = null;
      this.validation_results = null;
      this.theme = null;
      this.iconlib = null;
      this.template = null;
      this.__data = null;
      this.ready = false;
      this.element.innerHTML = '';
      this.element.removeAttribute('data-theme');
      this.destroyed = true;
    }
  }, {
    key: "on",
    value: function on(event, callback) {
      this.callbacks = this.callbacks || {};
      this.callbacks[event] = this.callbacks[event] || [];
      this.callbacks[event].push(callback);
      return this;
    }
  }, {
    key: "off",
    value: function off(event, callback) {
      /* Specific callback */
      if (event && callback) {
        this.callbacks = this.callbacks || {};
        this.callbacks[event] = this.callbacks[event] || [];
        var newcallbacks = [];

        for (var i = 0; i < this.callbacks[event].length; i++) {
          if (this.callbacks[event][i] === callback) continue;
          newcallbacks.push(this.callbacks[event][i]);
        }

        this.callbacks[event] = newcallbacks;
      } else if (event) {
        /* All callbacks for a specific event */
        this.callbacks = this.callbacks || {};
        this.callbacks[event] = [];
      } else {
        /* All callbacks for all events */
        this.callbacks = {};
      }

      return this;
    }
  }, {
    key: "trigger",
    value: function trigger(event, editor) {
      if (this.callbacks && this.callbacks[event] && this.callbacks[event].length) {
        for (var i = 0; i < this.callbacks[event].length; i++) {
          this.callbacks[event][i].apply(this, [editor]);
        }
      }

      return this;
    }
  }, {
    key: "setOption",
    value: function setOption(option, value) {
      if (option === 'show_errors') {
        this.options.show_errors = value;
        this.onChange();
      } else {
        /* Only the `show_errors` option is supported for now */
        throw new Error("Option ".concat(option, " must be set during instantiation and cannot be changed later"));
      }

      return this;
    }
  }, {
    key: "getEditorsRules",
    value: function getEditorsRules() {
      var extendRule = function extendRule(rules, editorClass) {
        return editorClass.rules ? Object(_utilities_js__WEBPACK_IMPORTED_MODULE_29__["extend"])(rules, editorClass.rules) : rules;
      };

      return Object.values(JSONEditor.defaults.editors).reduce(extendRule, {});
    }
  }, {
    key: "getEditorClass",
    value: function getEditorClass(schema) {
      var classname;
      schema = this.expandSchema(schema);
      JSONEditor.defaults.resolvers.find(function (resolver) {
        classname = resolver(schema);
        return classname && JSONEditor.defaults.editors[classname];
      });
      if (!classname) throw new Error("Unknown editor for schema ".concat(JSON.stringify(schema)));
      if (!JSONEditor.defaults.editors[classname]) throw new Error("Unknown editor ".concat(classname));
      return JSONEditor.defaults.editors[classname];
    }
  }, {
    key: "createEditor",
    value: function createEditor(editorClass, options) {
      var depthCounter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
      options = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_29__["extend"])({}, editorClass.options || {}, options); // eslint-disable-next-line new-cap

      return new editorClass(options, JSONEditor.defaults, depthCounter);
    }
  }, {
    key: "onChange",
    value: function onChange() {
      var _this2 = this;

      if (!this.ready) return;
      if (this.firing_change) return;
      this.firing_change = true;
      window.requestAnimationFrame(function () {
        _this2.firing_change = false;
        if (!_this2.ready) return;
        /* Validate and cache results */

        _this2.validation_results = _this2.validator.validate(_this2.root.getValue());

        if (_this2.options.show_errors !== 'never') {
          _this2.root.showValidationErrors(_this2.validation_results);
        } else {
          _this2.root.showValidationErrors([]);
        }
        /* Fire change event */


        _this2.trigger('change');
      });
      return this;
    }
  }, {
    key: "compileTemplate",
    value: function compileTemplate(template) {
      var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : JSONEditor.defaults.template;
      var engine;
      /* Specifying a preset engine */

      if (typeof name === 'string') {
        if (!JSONEditor.defaults.templates[name]) throw new Error("Unknown template engine ".concat(name));
        engine = JSONEditor.defaults.templates[name]();
        if (!engine) throw new Error("Template engine ".concat(name, " missing required library."));
      } else {
        /* Specifying a custom engine */
        engine = name;
      }

      if (!engine) throw new Error('No template engine set');
      if (!engine.compile) throw new Error('Invalid template engine set');
      return engine.compile(template);
    }
  }, {
    key: "_data",
    value: function _data(el, key, value) {
      /* Setting data */
      if (arguments.length === 3) {
        var uuid;

        if (el.hasAttribute("data-jsoneditor-".concat(key))) {
          uuid = el.getAttribute("data-jsoneditor-".concat(key));
        } else {
          uuid = this.uuid++;
          el.setAttribute("data-jsoneditor-".concat(key), uuid);
        }

        this.__data[uuid] = value;
      } else {
        /* Getting data */

        /* No data stored */
        if (!el.hasAttribute("data-jsoneditor-".concat(key))) return null;
        return this.__data[el.getAttribute("data-jsoneditor-".concat(key))];
      }
    }
  }, {
    key: "registerEditor",
    value: function registerEditor(editor) {
      this.editors = this.editors || {};
      this.editors[editor.path] = editor;
      return this;
    }
  }, {
    key: "unregisterEditor",
    value: function unregisterEditor(editor) {
      this.editors = this.editors || {};
      this.editors[editor.path] = null;
      return this;
    }
  }, {
    key: "getEditor",
    value: function getEditor(path) {
      if (!this.editors) return;
      return this.editors[path];
    }
  }, {
    key: "watch",
    value: function watch(path, callback) {
      this.watchlist = this.watchlist || {};
      this.watchlist[path] = this.watchlist[path] || [];
      this.watchlist[path].push(callback);
      return this;
    }
  }, {
    key: "unwatch",
    value: function unwatch(path, callback) {
      if (!this.watchlist || !this.watchlist[path]) return this;
      /* If removing all callbacks for a path */

      if (!callback) {
        this.watchlist[path] = null;
        return this;
      }

      var newlist = [];

      for (var i = 0; i < this.watchlist[path].length; i++) {
        if (this.watchlist[path][i] === callback) continue;else newlist.push(this.watchlist[path][i]);
      }

      this.watchlist[path] = newlist.length ? newlist : null;
      return this;
    }
  }, {
    key: "notifyWatchers",
    value: function notifyWatchers(path) {
      if (!this.watchlist || !this.watchlist[path]) return this;

      for (var i = 0; i < this.watchlist[path].length; i++) {
        this.watchlist[path][i]();
      }
    }
  }, {
    key: "isEnabled",
    value: function isEnabled() {
      return !this.root || this.root.isEnabled();
    }
  }, {
    key: "enable",
    value: function enable() {
      this.root.enable();
    }
  }, {
    key: "disable",
    value: function disable() {
      this.root.disable();
    }
  }, {
    key: "setCopyClipboardContents",
    value: function setCopyClipboardContents(value) {
      this.copyClipboard = value;
    }
  }, {
    key: "getCopyClipboardContents",
    value: function getCopyClipboardContents() {
      return this.copyClipboard;
    }
  }, {
    key: "addNewStyleRules",
    value: function addNewStyleRules(themeName, rules) {
      var styleTag = document.querySelector("#theme-".concat(themeName));

      if (!styleTag) {
        styleTag = document.createElement('style');
        styleTag.setAttribute('id', "theme-".concat(themeName));
        styleTag.appendChild(document.createTextNode(''));
        document.head.appendChild(styleTag);
      }

      var sheet = styleTag.sheet ? styleTag.sheet : styleTag.styleSheet;
      var qualifier = this.element.nodeName.toLowerCase();

      while (sheet.cssRules.length > 0) {
        sheet.deleteRule(0);
      }

      Object.keys(rules).forEach(function (selector) {
        var sel = themeName === 'default' ? selector : "".concat(qualifier, "[data-theme=\"").concat(themeName, "\"] ").concat(selector); // all browsers, except IE before version 9

        if (sheet.insertRule) sheet.insertRule(sel + ' {' + decodeURIComponent(rules[selector]) + '}', 0); // Internet Explorer before version 9
        else if (sheet.addRule) sheet.addRule(sel, decodeURIComponent(rules[selector]), 0);
      });
    }
  }, {
    key: "addNewStyleRulesToShadowRoot",
    value: function addNewStyleRulesToShadowRoot(themeName, rules, shadowRoot) {
      var qualifier = this.element.nodeName.toLowerCase();
      var cssText = '';
      Object.keys(rules).forEach(function (selector) {
        var sel = themeName === 'default' ? selector : "".concat(qualifier, "[data-theme=\"").concat(themeName, "\"] ").concat(selector);
        cssText += sel + ' {' + decodeURIComponent(rules[selector]) + '}' + '\n';
      });
      var styleSheet = new CSSStyleSheet();
      styleSheet.replaceSync(cssText);
      shadowRoot.adoptedStyleSheets = [].concat(_toConsumableArray(shadowRoot.adoptedStyleSheets), [styleSheet]);
    }
  }]);

  return JSONEditor;
}();
JSONEditor.defaults = _defaults_js__WEBPACK_IMPORTED_MODULE_22__["defaults"];
JSONEditor.AbstractEditor = _editor__WEBPACK_IMPORTED_MODULE_30__["AbstractEditor"];
JSONEditor.AbstractTheme = _theme__WEBPACK_IMPORTED_MODULE_31__["AbstractTheme"];
JSONEditor.AbstractIconLib = _iconlib__WEBPACK_IMPORTED_MODULE_32__["AbstractIconLib"];
Object.assign(JSONEditor.defaults.themes, _themes_index_js__WEBPACK_IMPORTED_MODULE_28__["themes"]);
Object.assign(JSONEditor.defaults.editors, _editors_index_js__WEBPACK_IMPORTED_MODULE_25__["editors"]);
Object.assign(JSONEditor.defaults.templates, _templates_index_js__WEBPACK_IMPORTED_MODULE_26__["templates"]);
Object.assign(JSONEditor.defaults.iconlibs, _iconlibs_index_js__WEBPACK_IMPORTED_MODULE_27__["iconlibs"]);

/***/ }),

/***/ "./src/defaults.js":
/*!*************************!*\
  !*** ./src/defaults.js ***!
  \*************************/
/*! exports provided: defaults */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaults", function() { return defaults; });
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.entries.js */ "./node_modules/core-js/modules/es.object.entries.js");
/* harmony import */ var core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.string.replace.js */ "./node_modules/core-js/modules/es.string.replace.js");
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ "./node_modules/core-js/modules/es.regexp.constructor.js");
/* harmony import */ var core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ "./node_modules/core-js/modules/es.regexp.to-string.js");
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ "./node_modules/core-js/modules/es.array.is-array.js");
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js");
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var _resolvers_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./resolvers.js */ "./src/resolvers.js");
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }




















/* default theme */

var theme = 'html';
/* default template engine */

var template = 'default';
/* Global callback list */

var callbacks = {};
var themes = {};
var templates = {};
var iconlibs = {};
var editors = {};
var languages = {}; // eslint-disable-next-line camelcase

var custom_validators = [];
/* Translation strings and default languages */
// eslint-disable-next-line camelcase

var default_language = 'en'; // eslint-disable-next-line camelcase

var language = default_language;
languages.en = {
  /**
   * When a property is not set
   */
  error_notset: 'Property must be set',

  /**
  * When a string must not be empty
  */
  error_notempty: 'Value required',

  /**
  * When a value is not one of the enumerated values
  */
  error_enum: 'Value must be one of the enumerated values',

  /**
  * When a value is not equal to the constant
  */
  error_const: 'Value must be the constant value',

  /**
  * When a value doesn't validate any schema of a 'anyOf' combination
  */
  error_anyOf: 'Value must validate against at least one of the provided schemas',

  /**
  * When a value doesn't validate
  * @variables This key takes one variable: The number of schemas the value does not validate
  */
  error_oneOf: 'Value must validate against exactly one of the provided schemas. It currently validates against {{0}} of the schemas.',

  /**
  * When a value does not validate a 'not' schema
  */
  error_not: 'Value must not validate against the provided schema',

  /**
  * When a value does not match any of the provided types
  */
  error_type_union: 'Value must be one of the provided types',

  /**
  * When a value does not match the given type
  * @variables This key takes one variable: The type the value should be of
  */
  error_type: 'Value must be of type {{0}}',

  /**
  *  When the value validates one of the disallowed types
  */
  error_disallow_union: 'Value must not be one of the provided disallowed types',

  /**
  *  When the value validates a disallowed type
  * @variables This key takes one variable: The type the value should not be of
  */
  error_disallow: 'Value must not be of type {{0}}',

  /**
  * When a value is not a multiple of or divisible by a given number
  * @variables This key takes one variable: The number mentioned above
  */
  error_multipleOf: 'Value must be a multiple of {{0}}',

  /**
  * When a value is greater than it's supposed to be (exclusive)
  * @variables This key takes one variable: The maximum
  */
  error_maximum_excl: 'Value must be less than {{0}}',

  /**
  * When a value is greater than it's supposed to be (inclusive
  * @variables This key takes one variable: The maximum
  */
  error_maximum_incl: 'Value must be at most {{0}}',

  /**
  * When a value is lesser than it's supposed to be (exclusive)
  * @variables This key takes one variable: The minimum
  */
  error_minimum_excl: 'Value must be greater than {{0}}',

  /**
  * When a value is lesser than it's supposed to be (inclusive)
  * @variables This key takes one variable: The minimum
  */
  error_minimum_incl: 'Value must be at least {{0}}',

  /**
  * When a value have too many characters
  * @variables This key takes one variable: The maximum character count
  */
  error_maxLength: 'Value must be at most {{0}} characters long',

  /**
  * When a value does not have enough characters
  * @variables This key takes one variable: The minimum character count
  */
  error_minLength: 'Value must be at least {{0}} characters long',

  /**
  * When a value does not match a given pattern
  */
  error_pattern: 'Value must match the pattern {{0}}',

  /**
  * When an array has additional items whereas it is not supposed to
  */
  error_additionalItems: 'No additional items allowed in this array',

  /**
  * When there are to many items in an array
  * @variables This key takes one variable: The maximum item count
  */
  error_maxItems: 'Value must have at most {{0}} items',

  /**
  * When there are not enough items in an array
  * @variables This key takes one variable: The minimum item count
  */
  error_minItems: 'Value must have at least {{0}} items',

  /**
  * When an array is supposed to have unique items but has duplicates
  */
  error_uniqueItems: 'Array must have unique items',

  /**
  * When there are too many properties in an object
  * @variables This key takes one variable: The maximum property count
  */
  error_maxProperties: 'Object must have at most {{0}} properties',

  /**
  * When there are not enough properties in an object
  * @variables This key takes one variable: The minimum property count
  */
  error_minProperties: 'Object must have at least {{0}} properties',

  /**
  * When a required property is not defined
  * @variables This key takes one variable: The name of the missing property
  */
  error_required: "Object is missing the required property '{{0}}'",

  /**
  * When there is an additional property is set whereas there should be none
  * @variables This key takes one variable: The name of the additional property
  */
  error_additional_properties: 'No additional properties allowed, but property {{0}} is set',

  /**
  * When there is a propertyName that sets a max length and a property name exceeds the max length
  * @variables This key takes one variable: The name of the invalid property
  */
  error_property_names_exceeds_maxlength: 'Property name {{0}} exceeds maxLength',

  /**
  * When there is a propertyName that sets an enum and a property name matches none of the possible enum
  * @variables This key takes one variable: The name of the invalid property
  */
  error_property_names_enum_mismatch: 'Property name {{0}} does not match any enum values',

  /**
  * When there is a propertyName that sets a const and a property does not match the const value
  * @variables This key takes one variable: The name of the invalid property
  */
  error_property_names_const_mismatch: 'Property name {{0}} does not match the const value',

  /**
  * When there is a propertyName that sets a pattern and a property name does not match the pattern
  * @variables This key takes one variable: The name of the invalid property
  */
  error_property_names_pattern_mismatch: 'Property name {{0}} does not match pattern',

  /**
  * When the propertyName is set to false and there is at least one property
  * @variables This key takes one variable: The name of the invalid property
  */
  error_property_names_false: 'Property name {{0}} fails when propertyName is false',

  /**
  * When the propertyName specifies a maxLength that is not a number
  * @variables This key takes one variable: The name of the current property
  */
  error_property_names_maxlength: 'Property name {{0}} cannot match invalid maxLength',

  /**
  * When the propertyName specifies an enum that is not an array
  * @variables This key takes one variable: The name of the current property
  */
  error_property_names_enum: 'Property name {{0}} cannot match invalid enum',

  /**
  * When the propertyName specifies a pattern that is not a string
  * @variables This key takes one variable: The name of the current property
  */
  error_property_names_pattern: 'Property name {{0}} cannot match invalid pattern',

  /**
  * When the propertyName is unsupported
  * @variables This key takes one variable: The name of the invalid propertyName
  */
  error_property_names_unsupported: 'Unsupported propertyName {{0}}',

  /**
  * When a dependency is not resolved
  * @variables This key takes one variable: The name of the missing property for the dependency
  */
  error_dependency: 'Must have property {{0}}',

  /**
  * When a date is in incorrect format
  * @variables This key takes one variable: The valid format
  */
  error_date: 'Date must be in the format {{0}}',

  /**
  * When a time is in incorrect format
  * @variables This key takes one variable: The valid format
  */
  error_time: 'Time must be in the format {{0}}',

  /**
  * When a datetime-local is in incorrect format
  * @variables This key takes one variable: The valid format
  */
  error_datetime_local: 'Datetime must be in the format {{0}}',

  /**
  * When a integer date is less than 1 January 1970
  */
  error_invalid_epoch: 'Date must be greater than 1 January 1970',

  /**
  * When an IPv4 is in incorrect format
  */
  error_ipv4: 'Value must be a valid IPv4 address in the form of 4 numbers between 0 and 255, separated by dots',

  /**
  * When an IPv6 is in incorrect format
  */
  error_ipv6: 'Value must be a valid IPv6 address',

  /**
  * When a hostname is in incorrect format
  */
  error_hostname: 'The hostname has the wrong format',

  /**
  * Text/Title on Save button
  */
  button_save: 'Save',

  /**
  * Text/Title on Copy button
  */
  button_copy: 'Copy',

  /**
  * Text/Title on Cancel button
  */
  button_cancel: 'Cancel',

  /**
  * Text/Title on Add button
  */
  button_add: 'Add',

  /**
  * Text on Delete All buttons
  */
  // button_delete_all: 'All',
  button_delete_all: 'Delete all', // Mahara: button text for sighted people

  /**
  * Title on Delete All buttons
  */
  // button_delete_all_title: 'Delete All',
  button_delete_all_title: 'Delete all {{0}}', // Mahara: button title text for non-sighted people

  /**
  * Text on Delete Last buttons
  * @variable This key takes one variable: The title of object to delete
  */
  button_delete_last: 'Last {{0}}',

  /**
  * Title on Delete Last buttons
  * @variable This key takes one variable: The title of object to delete
  */
  button_delete_last_title: 'Delete Last {{0}}',

  /**
  * Title on Add Row buttons
  * @variable This key takes one variable: The title of object to add
  */
  button_add_row_title: 'Add {{0}}', // button title text for non-sighted people
  button_add_row_text: 'Add', // button text for sighted people
  /** Title on Edit JSON buttons
  * TODO: enable copy/paste of json into the form directly.
  * The current functionality overwrites the form customisations and
  * creates a new form, so we're keeping the upload page for now.
  */
  button_edit: 'Edit raw', // Mahara

  /**
  * Title on Move Down buttons
  */
  // button_move_down_title: 'Move down',
  button_move_down: 'Move down', // Mahara: button text for sighted people
  button_move_down_title: 'Move {{0}} down', // Mahara: button title text for non-sighted people

  /**
  * Title on Move Up buttons
  */
   // button_move_up_title: 'Move up',
   button_move_up: 'Move up', // Mahara: button text for sighted people
   button_move_up_title: 'Move {{0}} up', // Mahara: button title text for non-sighted people

  /**
  * Text on Object Properties buttons
  */
  button_properties: 'Properties',

  /**
  * Title on Object Properties buttons
  */
  button_object_properties: 'Object Properties',

  /**
  * Title on Copy Row button
  * @variable This key takes one variable: The title of object to delete
  */
  button_copy_row_title: 'Copy {{0}}',

  /**
  * Title on Delete Row buttons
  * @variable This key takes one variable: The title of object to delete
  */
  button_delete_row_title: 'Delete {{0}}', // Mahara: button title text for non-sighted people

  /**
  * Title on Delete Row buttons, short version (no parameter with the object title)
  */
  button_delete_row_title_short: 'Delete', // Mahara: button text for sighted people

  /**
  * Title on Copy Row buttons, short version (no parameter with the object title)
  */
  button_copy_row_title_short: 'Copy',

  /**
  * Title on Collapse buttons
  */
  button_collapse: 'Collapse', // Mahara: button text for sighted people
  button_collapse_title: "Collapse {{0}}", // Mahara: button title text for non-sighted people

  /**
  * Title on Expand buttons
  */
  button_expand: 'Expand', // Mahara: button text for sighted people
  button_expand_title: "Expand {{0}}", // Mahara: button title text for non-sighted people

  /**
  * Title on Edit JSON buttons
  */
  // button_edit_json: 'Edit JSON'
  button_edit_json: 'Edit raw', // Mahara

  /**
  * Text/Title on Upload buttons
  */
  button_upload: 'Upload',

  /**
  * Title on Flatpickr toggle buttons
  */
  flatpickr_toggle_button: 'Toggle',

  /**
  * Title on Flatpickr clear buttons
  */
  flatpickr_clear_button: 'Clear',

  /**
  * Choices input field placeholder text
  */
  choices_placeholder_text: 'Start typing to add value',

  /**
  * Default title for array items
  */
  default_array_item_title: 'item',

  /**
  * Message to display when deleting a standard element
  */
   remove_element_message: 'Are you sure you want to remove this node?'
};
/* Default per-editor options */

Object.entries(editors).forEach(function (_ref) {
  var _ref2 = _slicedToArray(_ref, 2),
      i = _ref2[0],
      editor = _ref2[1];

  editors[i].options = editor.options || {};
});
/* Default upload handler */

function upload(type, file, cbs) {
  // eslint-disable-next-line no-console
  console.log('Upload handler required for upload editor');
}
/* String translate function */


function translate(key, variables) {
  var lang = defaults.languages[defaults.language];
  if (!lang) throw new Error("Unknown language ".concat(defaults.language));
  var string = lang[key] || defaults.languages[default_language][key] || key;

  if (variables) {
    for (var i = 0; i < variables.length; i++) {
      string = string.replace(new RegExp("\\{\\{".concat(i, "}}"), 'g'), variables[i]);
      // Mahara specific change - change button text to lc except first char.
      string = string.toLowerCase();
      string = string.charAt(0).toUpperCase() + string.slice(1);
      string = string.replace(/smartevidence/i, 'SmartEvidence');
      // Mahara change end ---
    }
  }

  return string;
}
/* Text element translate function */


function translateProperty(text, variables) {
  return text;
}
/* Default options when initializing JSON Editor */


var options = {
  upload: upload,
  prompt_before_delete: true,
  use_default_values: true,
  max_depth: 0
};
/* This assignment was previously in index.js but makes more sense here */

var defaults = {
  options: options,
  theme: theme,
  template: template,
  themes: themes,
  callbacks: callbacks,
  templates: templates,
  iconlibs: iconlibs,
  editors: editors,
  languages: languages,
  resolvers: _resolvers_js__WEBPACK_IMPORTED_MODULE_18__["resolvers"],
  custom_validators: custom_validators,
  default_language: default_language,
  language: language,
  translate: translate,
  translateProperty: translateProperty
};

/***/ }),

/***/ "./src/editor.js":
/*!***********************!*\
  !*** ./src/editor.js ***!
  \***********************/
/*! exports provided: AbstractEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractEditor", function() { return AbstractEditor; });
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.string.replace.js */ "./node_modules/core-js/modules/es.string.replace.js");
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.join.js */ "./node_modules/core-js/modules/es.array.join.js");
/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.string.split.js */ "./node_modules/core-js/modules/es.string.split.js");
/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ "./node_modules/core-js/modules/es.array.is-array.js");
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_array_some_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.array.some.js */ "./node_modules/core-js/modules/es.array.some.js");
/* harmony import */ var core_js_modules_es_array_some_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_some_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_string_starts_with_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.string.starts-with.js */ "./node_modules/core-js/modules/es.string.starts-with.js");
/* harmony import */ var core_js_modules_es_string_starts_with_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_starts_with_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.object.values.js */ "./node_modules/core-js/modules/es.object.values.js");
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ "./node_modules/core-js/modules/es.string.includes.js");
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.date.to-string.js */ "./node_modules/core-js/modules/es.date.to-string.js");
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ "./node_modules/core-js/modules/es.regexp.to-string.js");
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_19__);
/* harmony import */ var core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.object.entries.js */ "./node_modules/core-js/modules/es.object.entries.js");
/* harmony import */ var core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_20__);
/* harmony import */ var core_js_modules_es_function_bind_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.function.bind.js */ "./node_modules/core-js/modules/es.function.bind.js");
/* harmony import */ var core_js_modules_es_function_bind_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_bind_js__WEBPACK_IMPORTED_MODULE_21__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_22__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_23__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_24__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_25__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_26__);
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_27__);
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js");
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_28__);
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./utilities.js */ "./src/utilities.js");
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

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































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); return Constructor; }


/**
 * All editors should extend from this class
 */

var AbstractEditor = /*#__PURE__*/function () {
  function AbstractEditor(options, defaults) {
    _classCallCheck(this, AbstractEditor);

    this.defaults = defaults;
    this.jsoneditor = options.jsoneditor;
    this.theme = this.jsoneditor.theme;
    this.template_engine = this.jsoneditor.template;
    this.iconlib = this.jsoneditor.iconlib;
    this.translate = this.jsoneditor.translate || this.defaults.translate;
    this.translateProperty = this.jsoneditor.translateProperty || this.defaults.translateProperty;
    this.original_schema = options.schema;
    this.schema = this.jsoneditor.expandSchema(this.original_schema);
    this.active = true;
    this.options = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_29__["extend"])({}, this.options || {}, this.schema.options || {}, options.schema.options || {}, options);
    this.formname = this.jsoneditor.options.form_name_root || 'root';
    if (!options.path && !this.schema.id) this.schema.id = this.formname;
    this.path = options.path || this.formname;
    this.formname = options.formname || this.path.replace(/\.([^.]+)/g, '[$1]');
    this.parent = options.parent;
    this.key = this.parent !== undefined ? this.path.split('.').slice(this.parent.path.split('.').length).join('.') : this.path;
    this.link_watchers = [];
    this.watchLoop = false;
    if (options.container) this.setContainer(options.container);
    this.registerDependencies();
  }

  _createClass(AbstractEditor, [{
    key: "onChildEditorChange",
    value: function onChildEditorChange(editor) {
      this.onChange(true);
    }
  }, {
    key: "notify",
    value: function notify() {
      if (this.path) this.jsoneditor.notifyWatchers(this.path);
    }
  }, {
    key: "change",
    value: function change() {
      if (this.parent) this.parent.onChildEditorChange(this);else if (this.jsoneditor) this.jsoneditor.onChange();
    }
  }, {
    key: "onChange",
    value: function onChange(bubble) {
      this.notify();
      if (this.watch_listener) this.watch_listener();
      if (bubble) this.change();
    }
  }, {
    key: "register",
    value: function register() {
      this.jsoneditor.registerEditor(this);
      this.onChange();
    }
  }, {
    key: "unregister",
    value: function unregister() {
      if (!this.jsoneditor) return;
      this.jsoneditor.unregisterEditor(this);
    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      return 12;
    }
  }, {
    key: "isActive",
    value: function isActive() {
      return this.active;
    }
  }, {
    key: "activate",
    value: function activate() {
      this.active = true;
      this.optInCheckbox.checked = true;
      this.enable();
      this.change();
    }
  }, {
    key: "deactivate",
    value: function deactivate() {
      /* only non required properties can be deactivated. */
      if (!this.isRequired()) {
        this.active = false;
        this.optInCheckbox.checked = false;
        this.disable();
        this.change();
      }
    }
  }, {
    key: "registerDependencies",
    value: function registerDependencies() {
      var _this = this;

      this.dependenciesFulfilled = true;
      var deps = this.options.dependencies;

      if (!deps) {
        return;
      }

      Object.keys(deps).forEach(function (dependency) {
        var path = _this.path.split('.');

        path[path.length - 1] = dependency;
        path = path.join('.');

        _this.jsoneditor.watch(path, function () {
          _this.evaluateDependencies();
        });
      });
    }
  }, {
    key: "evaluateDependencies",
    value: function evaluateDependencies() {
      var _this2 = this;

      var wrapper = this.container || this.control;

      if (!wrapper || this.jsoneditor === null) {
        return;
      }

      var deps = this.options.dependencies;

      if (!deps) {
        return;
      } // Assume true and set to false if any unmet dependencies are found


      var previousStatus = this.dependenciesFulfilled;
      this.dependenciesFulfilled = true;
      Object.keys(deps).forEach(function (dependency) {
        var path = _this2.path.split('.');

        path[path.length - 1] = dependency;
        path = path.join('.');
        var choices = deps[dependency];

        _this2.checkDependency(path, choices);
      });

      if (this.dependenciesFulfilled !== previousStatus) {
        this.notify();
      }

      var displayMode = this.dependenciesFulfilled ? 'block' : 'none';

      if (this.options.hidden) {
        displayMode = 'none';
      }

      if (wrapper.tagName === 'TD') {
        Object.keys(wrapper.childNodes).forEach(function (child) {
          return wrapper.childNodes[child].style.display = displayMode;
        });
      } else wrapper.style.display = displayMode;
    }
  }, {
    key: "checkDependency",
    value: function checkDependency(path, choices) {
      var _this3 = this;

      if (this.path === path || this.jsoneditor === null) {
        return;
      }

      var editor = this.jsoneditor.getEditor(path);
      var value = editor ? editor.getValue() : undefined;

      if (!editor || !editor.dependenciesFulfilled) {
        this.dependenciesFulfilled = false;
      } else if (Array.isArray(choices)) {
        this.dependenciesFulfilled = choices.some(function (choice) {
          if (JSON.stringify(value) === JSON.stringify(choice)) {
            return true;
          }
        });
      } else if (_typeof(choices) === 'object') {
        if (_typeof(value) !== 'object') {
          this.dependenciesFulfilled = choices === value;
        } else {
          Object.keys(choices).some(function (key) {
            if (!Object(_utilities_js__WEBPACK_IMPORTED_MODULE_29__["hasOwnProperty"])(choices, key)) {
              return false;
            }

            if (!Object(_utilities_js__WEBPACK_IMPORTED_MODULE_29__["hasOwnProperty"])(value, key) || choices[key] !== value[key]) {
              _this3.dependenciesFulfilled = false;
              return true;
            }
          });
        }
      } else if (typeof choices === 'string' || typeof choices === 'number') {
        this.dependenciesFulfilled = this.dependenciesFulfilled && value === choices;
      } else if (typeof choices === 'boolean') {
        if (choices) {
          this.dependenciesFulfilled = this.dependenciesFulfilled && (value || value.length > 0);
        } else {
          this.dependenciesFulfilled = this.dependenciesFulfilled && (!value || value.length === 0);
        }
      }
    }
  }, {
    key: "setContainer",
    value: function setContainer(container) {
      this.container = container;
      if (this.schema.id) this.container.setAttribute('data-schemaid', this.schema.id);
      if (this.schema.type && typeof this.schema.type === 'string') this.container.setAttribute('data-schematype', this.schema.type);
      this.container.setAttribute('data-schemapath', this.path);
    }
  }, {
    key: "setOptInCheckbox",
    value: function setOptInCheckbox(header) {
      var _this4 = this;

      /* the active/deactive checbox control. */
      this.optInCheckbox = document.createElement('input');
      this.optInCheckbox.setAttribute('type', 'checkbox');
      this.optInCheckbox.setAttribute('style', 'margin: 0 10px 0 0;');
      this.optInCheckbox.classList.add('json-editor-opt-in');
      this.optInCheckbox.addEventListener('click', function () {
        if (_this4.isActive()) {
          _this4.deactivate();
        } else {
          _this4.activate();
        }
      });
      /* append active/deactive checkbox if show_opt_in is true */

      var globalOptIn = this.jsoneditor.options.show_opt_in;
      var parentOptInDefined = typeof this.parent.options.show_opt_in !== 'undefined';
      var parentOptInEnabled = parentOptInDefined && this.parent.options.show_opt_in === true;
      var parentOptInDisabled = parentOptInDefined && this.parent.options.show_opt_in === false;

      if (parentOptInEnabled || !parentOptInDisabled && globalOptIn || !parentOptInDefined && globalOptIn) {
        /* and control to type object editors if they are not required */
        if (this.parent && this.parent.schema.type === 'object' && !this.isRequired() && this.header) {
          this.header.appendChild(this.optInCheckbox);
          this.header.insertBefore(this.optInCheckbox, this.header.firstChild);
        }
      }
    }
  }, {
    key: "preBuild",
    value: function preBuild() {}
  }, {
    key: "build",
    value: function build() {}
  }, {
    key: "postBuild",
    value: function postBuild() {
      this.setupWatchListeners();
      this.addLinks();
      this.setValue(this.getDefault(), true);
      this.updateHeaderText();
      this.register();
      this.onWatchedFieldChange();
    }
  }, {
    key: "setupWatchListeners",
    value: function setupWatchListeners() {
      var _this5 = this;

      /* Watched fields */
      this.watched = {};
      if (this.schema.vars) this.schema.watch = this.schema.vars;
      this.watched_values = {};

      this.watch_listener = function () {
        if (_this5.refreshWatchedFieldValues()) {
          _this5.onWatchedFieldChange();
        }
      };

      if (Object(_utilities_js__WEBPACK_IMPORTED_MODULE_29__["hasOwnProperty"])(this.schema, 'watch')) {
        var path;
        var pathParts;
        var first;
        var root;
        var adjustedPath;
        var myPath = this.container.getAttribute('data-schemapath');
        Object.keys(this.schema.watch).forEach(function (name) {
          path = _this5.schema.watch[name];

          if (Array.isArray(path)) {
            if (path.length < 2) return;
            pathParts = [path[0]].concat(path[1].split('.'));
          } else {
            pathParts = path.split('.');
            if (!_this5.theme.closest(_this5.container, "[data-schemaid=\"".concat(pathParts[0], "\"]"))) pathParts.unshift('#');
          }

          first = pathParts.shift();
          if (first === '#') first = _this5.jsoneditor.schema.id || _this5.jsoneditor.root.formname;
          /* Find the root node for this template variable */

          root = _this5.theme.closest(_this5.container, "[data-schemaid=\"".concat(first, "\"]"));
          if (!root) throw new Error("Could not find ancestor node with id ".concat(first));
          /* Keep track of the root node and path for use when rendering the template */

          adjustedPath = "".concat(root.getAttribute('data-schemapath'), ".").concat(pathParts.join('.'));
          if (myPath.startsWith(adjustedPath)) _this5.watchLoop = true;

          _this5.jsoneditor.watch(adjustedPath, _this5.watch_listener);

          _this5.watched[name] = adjustedPath;
        });
      }
      /* Dynamic header */


      if (this.schema.headerTemplate) {
        this.header_template = this.jsoneditor.compileTemplate(this.schema.headerTemplate, this.template_engine);
      }
    }
  }, {
    key: "addLinks",
    value: function addLinks() {
      /* Add links */
      if (!this.no_link_holder) {
        this.link_holder = this.theme.getLinksHolder();
        /* if description element exists, insert the link before */

        if (typeof this.description !== 'undefined') this.description.parentNode.insertBefore(this.link_holder, this.description);
        /* otherwise just insert link at bottom of container */
        else this.container.appendChild(this.link_holder);

        if (this.schema.links) {
          for (var i = 0; i < this.schema.links.length; i++) {
            this.addLink(this.getLink(this.schema.links[i]));
          }
        }
      }
    }
  }, {
    key: "onMove",
    value: function onMove() {}
  }, {
    key: "getButton",
    value: function getButton(text, icon, title) {
      var args = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
      var btnClass = "json-editor-btn-".concat(icon);
      if (!this.iconlib) icon = null;else icon = this.iconlib.getIcon(icon);
      text = this.translate(text, args);
      title = this.translate(title, args);

      if (!icon && title) {
        text = title;
        title = null;
      }

      var btn = this.theme.getButton(text, icon, title);
      btn.classList.add(btnClass);
      return btn;
    }
  }, {
    key: "setButtonText",
    value: function setButtonText(button, text, icon, title) {
      var args = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
      if (!this.iconlib) icon = null;else icon = this.iconlib.getIcon(icon);
      text = this.translate(text, args);
      title = this.translate(title, args);

      if (!icon && title) {
        text = title;
        title = null;
      }

      return this.theme.setButtonText(button, text, icon, title);
    }
  }, {
    key: "addLink",
    value: function addLink(link) {
      if (this.link_holder) this.link_holder.appendChild(link);
    }
  }, {
    key: "getLink",
    value: function getLink(data) {
      var holder;
      var link;
      /* Get mime type of the link */

      var mime = data.mediaType || 'application/javascript';
      var type = mime.split('/')[0];
      /* Template to generate the link href */

      var href = this.jsoneditor.compileTemplate(data.href, this.template_engine);
      var relTemplate = this.jsoneditor.compileTemplate(data.rel ? data.rel : data.href, this.template_engine);
      /* Template to generate the link's download attribute */

      var download = null;
      if (data.download) download = data.download;

      if (download && download !== true) {
        download = this.jsoneditor.compileTemplate(download, this.template_engine);
      }
      /* Image links */


      if (type === 'image') {
        holder = this.theme.getBlockLinkHolder();
        link = document.createElement('a');
        link.setAttribute('target', '_blank');
        var image = document.createElement('img');
        this.theme.createImageLink(holder, link, image);
        /* When a watched field changes, update the url */

        this.link_watchers.push(function (vars) {
          var url = href(vars);
          var rel = relTemplate(vars);
          link.setAttribute('href', url);
          link.setAttribute('title', rel || url);
          image.setAttribute('src', url);
        });
        /* Audio/Video links */
      } else if (['audio', 'video'].includes(type)) {
        holder = this.theme.getBlockLinkHolder();
        link = this.theme.getBlockLink();
        link.setAttribute('target', '_blank');
        var media = document.createElement(type);
        media.setAttribute('controls', 'controls');
        this.theme.createMediaLink(holder, link, media);
        /* When a watched field changes, update the url */

        this.link_watchers.push(function (vars) {
          var url = href(vars);
          var rel = relTemplate(vars);
          link.setAttribute('href', url);
          link.textContent = rel || url;
          media.setAttribute('src', url);
        });
        /* Text links or blank link */
      } else {
        link = holder = this.theme.getBlockLink();
        holder.setAttribute('target', '_blank');
        holder.textContent = data.rel;
        holder.style.display = 'none';
        /* Prevent blank links from showing up when using custom view */

        /* When a watched field changes, update the url */

        this.link_watchers.push(function (vars) {
          var url = href(vars);
          var rel = relTemplate(vars);
          if (url) holder.style.display = '';
          holder.setAttribute('href', url);
          holder.textContent = rel || url;
        });
      }

      if (download && link) {
        if (download === true) {
          link.setAttribute('download', '');
        } else {
          this.link_watchers.push(function (vars) {
            link.setAttribute('download', download(vars));
          });
        }
      }

      if (data["class"]) link.classList.add(data["class"]);
      return holder;
    }
  }, {
    key: "refreshWatchedFieldValues",
    value: function refreshWatchedFieldValues() {
      var _this6 = this;

      if (!this.watched_values) return;
      var watched = {};
      var changed = false;

      if (this.watched) {
        Object.keys(this.watched).forEach(function (name) {
          var editor = _this6.jsoneditor.getEditor(_this6.watched[name]);

          var val = editor ? editor.getValue() : null;
          if (_this6.watched_values[name] !== val) changed = true;
          watched[name] = val;
        });
      }

      watched.self = this.getValue();
      if (this.watched_values.self !== watched.self) changed = true;
      this.watched_values = watched;
      return changed;
    }
  }, {
    key: "getWatchedFieldValues",
    value: function getWatchedFieldValues() {
      return this.watched_values;
    }
  }, {
    key: "updateHeaderText",
    value: function updateHeaderText() {
      if (this.header) {
        var headerText = this.getHeaderText();
        /* If the header has children, only update the text node's value */

        if (this.header.children.length) {
          for (var i = 0; i < this.header.childNodes.length; i++) {
            if (this.header.childNodes[i].nodeType === 3) {
              this.header.childNodes[i].nodeValue = this.cleanText(headerText);
              break;
            }
          }
          /* Otherwise, just update the entire node */

        } else {
          if (window.DOMPurify) this.header.innerHTML = window.DOMPurify.sanitize(headerText);else this.header.textContent = this.cleanText(headerText);
        }
      }
    }
  }, {
    key: "getHeaderText",
    value: function getHeaderText(titleOnly) {
      if (this.header_text) return this.header_text;else if (titleOnly) return this.translateProperty(this.schema.title);else return this.getTitle();
    }
  }, {
    key: "getPathDepth",
    value: function getPathDepth() {
      return this.path.split('.').length;
    }
  }, {
    key: "cleanText",
    value: function cleanText(txt) {
      /* Clean out HTML tags from txt */
      var tmp = document.createElement('div');
      tmp.innerHTML = txt;
      return tmp.textContent || tmp.innerText;
    }
  }, {
    key: "onWatchedFieldChange",
    value: function onWatchedFieldChange() {
      var vars;

      if (this.header_template) {
        vars = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_29__["extend"])(this.getWatchedFieldValues(), {
          key: this.key,
          i: this.key,
          i0: this.key * 1,
          i1: this.key * 1 + 1,
          title: this.getTitle()
        });
        var headerText = this.header_template(vars);

        if (headerText !== this.header_text) {
          this.header_text = headerText;
          this.updateHeaderText();
          this.notify();
          /* this.fireChangeHeaderEvent(); */
        }
      }

      if (this.link_watchers.length) {
        vars = this.getWatchedFieldValues();

        for (var i = 0; i < this.link_watchers.length; i++) {
          this.link_watchers[i](vars);
        }
      }
    }
  }, {
    key: "setValue",
    value: function setValue(value) {
      this.value = value;
    }
  }, {
    key: "getValue",
    value: function getValue() {
      if (!this.dependenciesFulfilled) {
        return undefined;
      }

      return this.value;
    }
  }, {
    key: "refreshValue",
    value: function refreshValue() {}
  }, {
    key: "getChildEditors",
    value: function getChildEditors() {
      return false;
    }
  }, {
    key: "destroy",
    value: function destroy() {
      var _this7 = this;

      this.unregister(this);

      if (this.watched) {
        Object.values(this.watched).forEach(function (adjustedPath) {
          return _this7.jsoneditor.unwatch(adjustedPath, _this7.watch_listener);
        });
      }

      this.watched = null;
      this.watched_values = null;
      this.watch_listener = null;
      this.header_text = null;
      this.header_template = null;
      this.value = null;
      if (this.container && this.container.parentNode) this.container.parentNode.removeChild(this.container);
      this.container = null;
      this.jsoneditor = null;
      this.schema = null;
      this.path = null;
      this.key = null;
      this.parent = null;
    }
  }, {
    key: "isDefaultRequired",
    value: function isDefaultRequired() {
      return this.isRequired() || !!this.jsoneditor.options.use_default_values;
    }
  }, {
    key: "getDefault",
    value: function getDefault() {
      if (typeof this.schema["default"] !== 'undefined') {
        return this.schema["default"];
      }

      if (typeof this.schema["enum"] !== 'undefined') {
        return this.schema["enum"][0];
      }

      var type = this.schema.type || this.schema.oneOf;
      if (type && Array.isArray(type)) type = type[0];
      if (type && _typeof(type) === 'object') type = type.type;
      if (type && Array.isArray(type)) type = type[0];

      if (typeof type === 'string') {
        if (type === 'number') return this.isDefaultRequired() ? 0.0 : undefined;
        if (type === 'boolean') return this.isDefaultRequired() ? false : undefined;
        if (type === 'integer') return this.isDefaultRequired() ? 0 : undefined;
        if (type === 'string') return '';
        if (type === 'object') return {};
        if (type === 'array') return [];
      }

      return null;
    }
  }, {
    key: "getTitle",
    value: function getTitle() {
      return this.translateProperty(this.schema.title || this.key);
    }
  }, {
    key: "enable",
    value: function enable() {
      this.disabled = false;
    }
  }, {
    key: "disable",
    value: function disable() {
      this.disabled = true;
    }
  }, {
    key: "isEnabled",
    value: function isEnabled() {
      return !this.disabled;
    }
  }, {
    key: "isRequired",
    value: function isRequired() {
      if (typeof this.schema.required === 'boolean') return this.schema.required;else if (this.parent && this.parent.schema && Array.isArray(this.parent.schema.required)) return this.parent.schema.required.includes(this.key);else if (this.jsoneditor.options.required_by_default) return true;else return false;
    }
  }, {
    key: "getDisplayText",
    value: function getDisplayText(arr) {
      var disp = [];
      var used = {};
      /* Determine how many times each attribute name is used. */

      /* This helps us pick the most distinct display text for the schemas. */

      arr.forEach(function (el) {
        if (el.title) {
          used[el.title] = used[el.title] || 0;
          used[el.title]++;
        }

        if (el.description) {
          used[el.description] = used[el.description] || 0;
          used[el.description]++;
        }

        if (el.format) {
          used[el.format] = used[el.format] || 0;
          used[el.format]++;
        }

        if (el.type) {
          used[el.type] = used[el.type] || 0;
          used[el.type]++;
        }
      });
      /* Determine display text for each element of the array */

      arr.forEach(function (el) {
        var name;
        /* If it's a simple string */

        if (typeof el === 'string') name = el;
        /* Object */
        else if (el.title && used[el.title] <= 1) name = el.title;else if (el.format && used[el.format] <= 1) name = el.format;else if (el.type && used[el.type] <= 1) name = el.type;else if (el.description && used[el.description] <= 1) name = el.descripton;else if (el.title) name = el.title;else if (el.format) name = el.format;else if (el.type) name = el.type;else if (el.description) name = el.description;else if (JSON.stringify(el).length < 500) name = JSON.stringify(el);else name = 'type';
        disp.push(name);
      });
      /* Replace identical display text with "text 1", "text 2", etc. */

      var inc = {};
      disp.forEach(function (name, i) {
        inc[name] = inc[name] || 0;
        inc[name]++;
        if (used[name] > 1) disp[i] = "".concat(name, " ").concat(inc[name]);
      });
      return disp;
    }
    /* Replace space(s) with "-" to create valid id value */

  }, {
    key: "getValidId",
    value: function getValidId(id) {
      id = id === undefined ? '' : id.toString();
      return id.replace(/\s+/g, '-');
    }
  }, {
    key: "setInputAttributes",
    value: function setInputAttributes(inputAttribute) {
      var _this8 = this;

      if (this.schema.options && this.schema.options.inputAttributes) {
        var inputAttributes = this.schema.options.inputAttributes;
        var protectedAttributes = ['name', 'type'].concat(inputAttribute);
        Object.keys(inputAttributes).forEach(function (key) {
          if (!protectedAttributes.includes(key.toLowerCase())) {
            _this8.input.setAttribute(key, inputAttributes[key]);
          }
        });
      }
    }
  }, {
    key: "expandCallbacks",
    value: function expandCallbacks(scope, options) {
      var _this9 = this;

      var callback = this.defaults.callbacks[scope];
      Object.entries(options).forEach(function (_ref) {
        var _ref2 = _slicedToArray(_ref, 2),
            key = _ref2[0],
            value = _ref2[1];

        if (value === Object(value)) {
          options[key] = _this9.expandCallbacks(scope, value);
        } else if (typeof value === 'string' && _typeof(callback) === 'object' && typeof callback[value] === 'function') {
          options[key] = callback[value].bind(null, _this9);
        }
      });
      return options;
    }
  }, {
    key: "showValidationErrors",
    value: function showValidationErrors(errors) {}
  }]);

  return AbstractEditor;
}();

/***/ }),

/***/ "./src/editors/ace.js":
/*!****************************!*\
  !*** ./src/editors/ace.js ***!
  \****************************/
/*! exports provided: AceEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AceEditor", function() { return AceEditor; });
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./string.js */ "./src/editors/string.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var AceEditor = /*#__PURE__*/function (_StringEditor) {
  _inherits(AceEditor, _StringEditor);

  var _super = _createSuper(AceEditor);

  function AceEditor() {
    _classCallCheck(this, AceEditor);

    return _super.apply(this, arguments);
  }

  _createClass(AceEditor, [{
    key: "setValue",
    value: function setValue(value, initial, fromTemplate) {
      var res = _get(_getPrototypeOf(AceEditor.prototype), "setValue", this).call(this, value, initial, fromTemplate);

      if (res !== undefined && res.changed && this.ace_editor_instance) {
        this.ace_editor_instance.setValue(res.value);
        this.ace_editor_instance.session.getSelection().clearSelection();
        this.ace_editor_instance.resize();
      }
    }
  }, {
    key: "build",
    value: function build() {
      this.options.format = 'textarea';
      /* Force format into "textarea" */

      _get(_getPrototypeOf(AceEditor.prototype), "build", this).call(this);

      this.input_type = this.schema.format;
      /* Restore original format */

      this.input.setAttribute('data-schemaformat', this.input_type);
    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady() {
      var _this = this;

      var options;

      if (window.ace) {
        var mode = this.input_type;
        /* aliases for c/cpp */

        if (mode === 'cpp' || mode === 'c++' || mode === 'c') mode = 'c_cpp';
        /* Get options, either global options from "this.defaults.options.ace" or */

        /* single property options from schema "options.ace" */

        options = this.expandCallbacks('ace', Object(_utilities_js__WEBPACK_IMPORTED_MODULE_15__["extend"])({}, {
          selectionStyle: 'text',
          minLines: 30,
          maxLines: 30
        }, this.defaults.options.ace || {}, this.options.ace || {}, {
          mode: "ace/mode/".concat(mode)
        }));
        this.ace_container = document.createElement('div');
        this.ace_container.style.width = '100%';
        this.ace_container.style.position = 'relative';
        /* this.ace_container.style.height = '400px'; */

        this.input.parentNode.insertBefore(this.ace_container, this.input);
        this.input.style.display = 'none';
        this.ace_editor_instance = window.ace.edit(this.ace_container, options);
        this.ace_editor_instance.setValue(this.getValue());
        this.ace_editor_instance.session.getSelection().clearSelection();
        this.ace_editor_instance.resize();

        if (this.schema.readOnly || this.schema.readonly || this.schema.template) {
          this.ace_editor_instance.setReadOnly(true);
        }
        /* Listen for changes */


        this.ace_editor_instance.on('change', function () {
          _this.input.value = _this.ace_editor_instance.getValue();

          _this.refreshValue();

          _this.is_dirty = true;

          _this.onChange(true);
        });
        this.theme.afterInputReady(this.input);
      } else _get(_getPrototypeOf(AceEditor.prototype), "afterInputReady", this).call(this);
      /* Library not loaded, so just treat this as a string */

    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      return 6;
    }
  }, {
    key: "enable",
    value: function enable() {
      if (!this.always_disabled && this.ace_editor_instance) this.ace_editor_instance.setReadOnly(false);

      _get(_getPrototypeOf(AceEditor.prototype), "enable", this).call(this);
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      if (this.ace_editor_instance) this.ace_editor_instance.setReadOnly(true);

      _get(_getPrototypeOf(AceEditor.prototype), "disable", this).call(this, alwaysDisabled);
    }
  }, {
    key: "destroy",
    value: function destroy() {
      if (this.ace_editor_instance) {
        this.ace_editor_instance.destroy();
        this.ace_editor_instance = null;
      }

      _get(_getPrototypeOf(AceEditor.prototype), "destroy", this).call(this);
    }
  }]);

  return AceEditor;
}(_string_js__WEBPACK_IMPORTED_MODULE_14__["StringEditor"]);

/***/ }),

/***/ "./src/editors/array.css.js":
/*!**********************************!*\
  !*** ./src/editors/array.css.js ***!
  \**********************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* eslint-disable */
/* harmony default export */ __webpack_exports__["default"] = ({
  ".json-editor-btntype-toggle": "margin:0%2010px%200%200",
  ".je-array-control-btn": "width:100%25;text-align:left;margin-bottom:3px"
});
/* eslint-enable */

/***/ }),

/***/ "./src/editors/array.js":
/*!******************************!*\
  !*** ./src/editors/array.js ***!
  \******************************/
/*! exports provided: ArrayEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArrayEditor", function() { return ArrayEditor; });
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ "./node_modules/core-js/modules/es.array.is-array.js");
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.array.find.js */ "./node_modules/core-js/modules/es.array.find.js");
/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_array_some_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.some.js */ "./node_modules/core-js/modules/es.array.some.js");
/* harmony import */ var core_js_modules_es_array_some_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_some_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_19__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_20__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_21__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_22__);
/* harmony import */ var _editor_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../editor.js */ "./src/editor.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
/* harmony import */ var _array_css_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./array.css.js */ "./src/editors/array.css.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

























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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }




var ArrayEditor = /*#__PURE__*/function (_AbstractEditor) {
  _inherits(ArrayEditor, _AbstractEditor);

  var _super = _createSuper(ArrayEditor);

  function ArrayEditor() {
    _classCallCheck(this, ArrayEditor);

    return _super.apply(this, arguments);
  }

  _createClass(ArrayEditor, [{
    key: "askConfirmation",
    value: function askConfirmation() {
      if (this.jsoneditor.options.prompt_before_delete === true) {
        // Mahara custom message
        if (window.confirm(this.translate('remove_element_message')) === false) {
          return false;
        }
      }

      return true;
    }
  }, {
    key: "getDefault",
    value: function getDefault() {
      return this.schema["default"] || [];
    }
  }, {
    key: "register",
    value: function register() {
      _get(_getPrototypeOf(ArrayEditor.prototype), "register", this).call(this);

      if (this.rows) {
        this.rows.forEach(function (row) {
          return row.register();
        });
      }
    }
  }, {
    key: "unregister",
    value: function unregister() {
      _get(_getPrototypeOf(ArrayEditor.prototype), "unregister", this).call(this);

      if (this.rows) {
        this.rows.forEach(function (row) {
          return row.unregister();
        });
      }
    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      var info = this.getItemInfo(0);
      /* Tabs require extra horizontal space */

      if (this.tabs_holder && this.schema.format !== 'tabs-top') {
        return Math.max(Math.min(12, info.width + 2), 4);
      }

      return info.width;
    }
  }, {
    key: "enable",
    value: function enable() {
      var _this = this;

      if (!this.always_disabled) {
        this.setAvailability(this, false);

        if (this.rows) {
          this.rows.forEach(function (row) {
            row.enable();

            _this.setAvailability(row, false);
          });
        }

        _get(_getPrototypeOf(ArrayEditor.prototype), "enable", this).call(this);
      }
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      var _this2 = this;

      if (alwaysDisabled) this.always_disabled = true;
      this.setAvailability(this, true);

      if (this.rows) {
        this.rows.forEach(function (row) {
          row.disable(alwaysDisabled);

          _this2.setAvailability(row, true);
        });
      }

      _get(_getPrototypeOf(ArrayEditor.prototype), "disable", this).call(this);
    }
  }, {
    key: "setAvailability",
    value: function setAvailability(element, val) {
      if (element.add_row_button) element.add_row_button.disabled = val;
      if (element.remove_all_rows_button) element.remove_all_rows_button.disabled = val;
      if (element.delete_last_row_button) element.delete_last_row_button.disabled = val;
      if (element.copy_button) element.copy_button.disabled = val;
      if (element.delete_button) element.delete_button.disabled = val;
      if (element.moveup_button) element.moveup_button.disabled = val;
      if (element.movedown_button) element.movedown_button.disabled = val;
    }
  }, {
    key: "preBuild",
    value: function preBuild() {
      _get(_getPrototypeOf(ArrayEditor.prototype), "preBuild", this).call(this);

      this.rows = [];
      this.row_cache = [];
      this.hide_delete_buttons = this.options.disable_array_delete || this.jsoneditor.options.disable_array_delete;
      this.hide_delete_all_rows_buttons = this.hide_delete_buttons || this.options.disable_array_delete_all_rows || this.jsoneditor.options.disable_array_delete_all_rows;
      this.hide_delete_last_row_buttons = this.hide_delete_buttons || this.options.disable_array_delete_last_row || this.jsoneditor.options.disable_array_delete_last_row;
      this.hide_move_buttons = this.options.disable_array_reorder || this.jsoneditor.options.disable_array_reorder;
      this.hide_add_button = this.options.disable_array_add || this.jsoneditor.options.disable_array_add;
      this.show_copy_button = this.options.enable_array_copy || this.jsoneditor.options.enable_array_copy;
      this.array_controls_top = this.options.array_controls_top || this.jsoneditor.options.array_controls_top;
    }
  }, {
    key: "build",
    value: function build() {
      if (!this.options.compact) {
        // this.header = document.createElement('label');
        this.header = document.createElement('span'); // Mahara
        this.header.textContent = this.getTitle();
        this.title = this.theme.getHeader(this.header, this.getPathDepth());
        this.container.appendChild(this.title);

        if (this.options.infoText) {
          this.infoButton = this.theme.getInfoButton(this.translateProperty(this.options.infoText));
          this.container.appendChild(this.infoButton);
        }

        this.title_controls = this.theme.getHeaderButtonHolder();
        this.title.appendChild(this.title_controls);

        if (this.schema.description) {
          this.description = this.theme.getDescription(this.translateProperty(this.schema.description));
          this.container.appendChild(this.description);
        }

        this.error_holder = document.createElement('div');
        this.container.appendChild(this.error_holder);

        if (this.schema.format === 'tabs-top') {
          this.controls = this.theme.getHeaderButtonHolder();
          // Mahara: add controls after h3 tag, not inside
          this.title.after(this.controls);
          this.tabs_holder = this.theme.getTopTabHolder(this.getValidId(this.getItemTitle()));
          this.container.appendChild(this.tabs_holder);
          this.row_holder = this.theme.getTopTabContentHolder(this.tabs_holder);
          this.active_tab = null;
        } else if (this.schema.format === 'tabs') {
          this.controls = this.theme.getHeaderButtonHolder();
          this.title.appendChild(this.controls);
          this.tabs_holder = this.theme.getTabHolder(this.getValidId(this.getItemTitle()));
          this.container.appendChild(this.tabs_holder);
          this.row_holder = this.theme.getTabContentHolder(this.tabs_holder);
          this.active_tab = null;
        } else {
          this.panel = this.theme.getIndentedPanel();
          this.container.appendChild(this.panel);
          this.row_holder = document.createElement('div');
          this.panel.appendChild(this.row_holder);
          this.controls = this.theme.getButtonHolder();

          if (this.array_controls_top) {
            this.title.appendChild(this.controls);
          } else {
            this.panel.appendChild(this.controls);
          }
        }
      } else {
        /* compact mode */
        this.title = this.theme.getHeader('', this.getPathDepth());
        this.container.appendChild(this.title);
        this.panel = this.theme.getIndentedPanel();
        this.container.appendChild(this.panel);
        this.title_controls = this.theme.getHeaderButtonHolder();
        this.title.appendChild(this.title_controls);
        this.controls = this.theme.getHeaderButtonHolder();
        this.title.appendChild(this.controls);
        this.row_holder = document.createElement('div');
        this.panel.appendChild(this.row_holder);
      }
      /* Add controls */


      this.addControls();
    }
  }, {
    key: "onChildEditorChange",
    value: function onChildEditorChange(editor) {
      this.refreshValue();
      this.refreshTabs(true);

      _get(_getPrototypeOf(ArrayEditor.prototype), "onChildEditorChange", this).call(this, editor);
    }
  }, {
    key: "getItemTitle",
    value: function getItemTitle() {
      if (!this.item_title) {
        if (this.schema.items && !Array.isArray(this.schema.items)) {
          var tmp = this.jsoneditor.expandRefs(this.schema.items);
          this.item_title = this.translateProperty(tmp.title) || this.translate('default_array_item_title');
        } else {
          this.item_title = this.translate('default_array_item_title');
        }
      }

      return this.cleanText(this.item_title);
    }
  }, {
    key: "getItemSchema",
    value: function getItemSchema(i) {
      if (Array.isArray(this.schema.items)) {
        if (i >= this.schema.items.length) {
          if (this.schema.additionalItems === true) {
            return {};
          } else if (this.schema.additionalItems) {
            return Object(_utilities_js__WEBPACK_IMPORTED_MODULE_24__["extend"])({}, this.schema.additionalItems);
          }
        } else {
          return Object(_utilities_js__WEBPACK_IMPORTED_MODULE_24__["extend"])({}, this.schema.items[i]);
        }
      } else if (this.schema.items) {
        return Object(_utilities_js__WEBPACK_IMPORTED_MODULE_24__["extend"])({}, this.schema.items);
      } else {
        return {};
      }
    }
  }, {
    key: "getItemInfo",
    value: function getItemInfo(i) {
      var schema = this.getItemSchema(i);
      /* Check if it's cached */

      this.item_info = this.item_info || {};
      var stringified = JSON.stringify(schema);
      if (typeof this.item_info[stringified] !== 'undefined') return this.item_info[stringified];
      /* Get the schema for this item */

      schema = this.jsoneditor.expandRefs(schema);
      this.item_info[stringified] = {
        title: this.translateProperty(schema.title) || this.translate('default_array_item_title'),
        "default": schema["default"],
        width: 12,
        child_editors: schema.properties || schema.items
      };
      return this.item_info[stringified];
    }
  }, {
    key: "getElementEditor",
    value: function getElementEditor(i) {
      var itemInfo = this.getItemInfo(i);
      var schema = this.getItemSchema(i);
      schema = this.jsoneditor.expandRefs(schema);
      schema.title = "".concat(itemInfo.title, " ").concat(i + 1);
      var editor = this.jsoneditor.getEditorClass(schema);
      var holder;

      if (this.tabs_holder) {
        if (this.schema.format === 'tabs-top') {
          holder = this.theme.getTopTabContent();
        } else {
          holder = this.theme.getTabContent();
        }

        holder.id = "".concat(this.path, ".").concat(i);
      } else if (itemInfo.child_editors) {
        holder = this.theme.getChildEditorHolder();
      } else {
        holder = this.theme.getIndentedPanel();
      }

      this.row_holder.appendChild(holder);
      var ret = this.jsoneditor.createEditor(editor, {
        jsoneditor: this.jsoneditor,
        schema: schema,
        container: holder,
        path: "".concat(this.path, ".").concat(i),
        parent: this,
        required: true
      });
      ret.preBuild();
      ret.build();
      ret.postBuild();

      if (!ret.title_controls) {
        ret.array_controls = this.theme.getButtonHolder();
        // Mahara: add controls after title
        holder.insertBefore(ret.array_controls, holder.children[1]);
      }

      return ret;
    }
  }, {
    key: "checkParent",
    value: function checkParent(elem) {
      return elem && elem.parentNode;
    }
  }, {
    key: "destroy",
    value: function destroy() {
      this.empty(true);
      if (this.checkParent(this.title)) this.title.parentNode.removeChild(this.title);
      if (this.checkParent(this.description)) this.description.parentNode.removeChild(this.description);
      if (this.checkParent(this.row_holder)) this.row_holder.parentNode.removeChild(this.row_holder);
      if (this.checkParent(this.controls)) this.controls.parentNode.removeChild(this.controls);
      if (this.checkParent(this.panel)) this.panel.parentNode.removeChild(this.panel);
      this.rows = this.row_cache = this.title = this.description = this.row_holder = this.panel = this.controls = null;

      _get(_getPrototypeOf(ArrayEditor.prototype), "destroy", this).call(this);
    }
  }, {
    key: "empty",
    value: function empty(hard) {
      var _this3 = this;

      if (!this.rows) return;
      this.rows.forEach(function (row, i) {
        if (hard) {
          if (_this3.checkParent(row.tab)) row.tab.parentNode.removeChild(row.tab);

          _this3.destroyRow(row, true);

          _this3.row_cache[i] = null;
        }

        _this3.rows[i] = null;
      });
      this.rows = [];
      if (hard) this.row_cache = [];
    }
  }, {
    key: "destroyRow",
    value: function destroyRow(row, hard) {
      var holder = row.container;

      if (hard) {
        row.destroy();
        if (holder.parentNode) holder.parentNode.removeChild(holder);
        if (this.checkParent(row.tab)) row.tab.parentNode.removeChild(row.tab);
      } else {
        if (row.tab) row.tab.style.display = 'none';
        holder.style.display = 'none';
        row.unregister();
      }
    }
  }, {
    key: "getMax",
    value: function getMax() {
      if (Array.isArray(this.schema.items) && this.schema.additionalItems === false) {
        return Math.min(this.schema.items.length, this.schema.maxItems || Infinity);
      }

      return this.schema.maxItems || Infinity;
    }
  }, {
    key: "refreshTabs",
    value: function refreshTabs(refreshHeaders) {
      var _this4 = this;

      this.rows.forEach(function (row) {
        if (!row.tab) return;

        if (refreshHeaders) {
          row.tab_text.textContent = row.getHeaderText();
        } else if (row.tab === _this4.active_tab) {
          _this4.theme.markTabActive(row);
        } else {
          _this4.theme.markTabInactive(row);
        }
      });
    }
  }, {
    key: "ensureArraySize",
    value: function ensureArraySize(value) {
      if (!Array.isArray(value)) value = [value];

      if (this.schema.minItems) {
        while (value.length < this.schema.minItems) {
          value.push(this.getItemInfo(value.length)["default"]);
        }
      }

      if (this.getMax() && value.length > this.getMax()) {
        value = value.slice(0, this.getMax());
      }

      return value;
    }
  }, {
    key: "setValue",
    value: function setValue() {
      var _this5 = this;

      var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
      var initial = arguments.length > 1 ? arguments[1] : undefined;

      /* Make sure value has between minItems and maxItems items in it */
      value = this.ensureArraySize(value);
      var serialized = JSON.stringify(value);
      if (serialized === this.serialized) return;
      value.forEach(function (val, i) {
        if (_this5.rows[i]) {
          /* TODO: don't set the row's value if it hasn't changed */
          _this5.rows[i].setValue(val, initial);
        } else if (_this5.row_cache[i]) {
          _this5.rows[i] = _this5.row_cache[i];

          _this5.rows[i].setValue(val, initial);

          _this5.rows[i].container.style.display = '';
          if (_this5.rows[i].tab) _this5.rows[i].tab.style.display = '';

          _this5.rows[i].register();

          _this5.jsoneditor.trigger('addRow', _this5.rows[i]);
        } else {
          var editor = _this5.addRow(val, initial);

          _this5.jsoneditor.trigger('addRow', editor);
        }
      });

      for (var j = value.length; j < this.rows.length; j++) {
        this.destroyRow(this.rows[j]);
        this.rows[j] = null;
      }

      this.rows = this.rows.slice(0, value.length);
      /* Set the active tab */

      var row = this.rows.find(function (row) {
        return row.tab === _this5.active_tab;
      });
      var newActiveTab = typeof row !== 'undefined' ? row.tab : null;
      if (!newActiveTab && this.rows.length) newActiveTab = this.rows[0].tab;
      this.active_tab = newActiveTab;
      this.refreshValue(initial);
      this.refreshTabs(true);
      this.refreshTabs();
      this.onChange();
      /* TODO: sortable */
    }
  }, {
    key: "setVisibility",
    value: function setVisibility(element, display) {
      element.style.display = display ? '' : 'none';
    }
  }, {
    key: "setupButtons",
    value: function setupButtons(minItems) {
      var controlsNeeded = [];

      if (!this.value.length) {
        // Mahara: show the delete button
        // this.delete_last_row_button.style.display = 'none';
        this.remove_all_rows_button.style.display = 'none';
      } else if (this.value.length === 1) {
        this.remove_all_rows_button.style.display = 'none';
        /* If there are minItems items in the array, or configured to hide the delete_last_row button, hide the delete button beneath the rows */

        var _display = !(minItems || this.hide_delete_last_row_buttons);

        this.setVisibility(this.delete_last_row_button, _display);
        controlsNeeded.push(_display);
      } else {
        var display1 = !(minItems || this.hide_delete_last_row_buttons);
        this.setVisibility(this.delete_last_row_button, display1);
        controlsNeeded.push(display1);
        var display2 = !(minItems || this.hide_delete_all_rows_buttons);
        this.setVisibility(this.remove_all_rows_button, display2);
        controlsNeeded.push(display2);
      }
      /* If there are maxItems in the array, hide the add button beneath the rows */


      var display = !(this.getMax() && this.getMax() <= this.rows.length || this.hide_add_button);
      this.setVisibility(this.add_row_button, display);
      controlsNeeded.push(display);
      return controlsNeeded.some(function (e) {
        return e;
      });
    }
  }, {
    key: "refreshValue",
    value: function refreshValue(force) {
      var _this6 = this;

      var oldi = this.value ? this.value.length : 0;
      /* Get the value for this editor */

      this.value = this.rows.map(function (editor) {
        return editor.getValue();
      });

      if (oldi !== this.value.length || force) {
        /* If we currently have minItems items in the array */
        var minItems = this.schema.minItems && this.schema.minItems >= this.rows.length;
        this.rows.forEach(function (editor, i) {
          /* Hide the move down button for the last row */
          if (editor.movedown_button) {
            var display = i !== _this6.rows.length - 1;

            _this6.setVisibility(editor.movedown_button, display);
          }
          /* Hide the delete button if we have minItems items */


          if (editor.delete_button) {
            _this6.setVisibility(editor.delete_button, !minItems);
          }
          /* Get the value for this editor */


          _this6.value[i] = editor.getValue();
        });

        if (!this.collapsed && this.setupButtons(minItems)) {
          this.controls.style.display = 'inline-block';
        } else {
          this.controls.style.display = 'none';
        }
      }

      this.serialized = JSON.stringify(this.value);
    }
  }, {
    key: "addRow",
    value: function addRow(value, initial) {
      var _this7 = this;

      var i = this.rows.length;
      this.rows[i] = this.getElementEditor(i);
      this.row_cache[i] = this.rows[i];

      if (this.tabs_holder) {
        this.rows[i].tab_text = document.createElement('span');
        this.rows[i].tab_text.textContent = this.rows[i].getHeaderText();

        if (this.schema.format === 'tabs-top') {
          this.rows[i].tab = this.theme.getTopTab(this.rows[i].tab_text, this.getValidId(this.rows[i].path));
          this.theme.addTopTab(this.tabs_holder, this.rows[i].tab);
        } else {
          this.rows[i].tab = this.theme.getTab(this.rows[i].tab_text, this.getValidId(this.rows[i].path));
          this.theme.addTab(this.tabs_holder, this.rows[i].tab);
        }

        this.rows[i].tab.addEventListener('click', function (e) {
          _this7.active_tab = _this7.rows[i].tab;

          _this7.refreshTabs();

          e.preventDefault();
          e.stopPropagation();
        });
      }

      var controlsHolder = this.rows[i].title_controls || this.rows[i].array_controls;
      /* Buttons to delete row, move row up, and move row down */

      if (!this.hide_delete_buttons) {
        this.rows[i].delete_button = this._createDeleteButton(i, controlsHolder);
      }
      /* Button to copy an array element and add it as last element */


      if (this.show_copy_button) {
        this.rows[i].copy_button = this._createCopyButton(i, controlsHolder);
      }

      if (i && !this.hide_move_buttons) {
        this.rows[i].moveup_button = this._createMoveUpButton(i, controlsHolder);
      }

      if (!this.hide_move_buttons) {
        this.rows[i].movedown_button = this._createMoveDownButton(i, controlsHolder);
      }

      if (typeof value !== 'undefined') this.rows[i].setValue(value, initial);
      this.refreshTabs();
      return this.rows[i];
    }
  }, {
    key: "_createDeleteButton",
    value: function _createDeleteButton(i, holder) {
      var _this8 = this;
      // Mahara: custom button text
      var button = this.getButton('button_delete_row_title_short', 'delete', 'button_delete_row_title', [this.getItemTitle()]);
      button.classList.add('delete', 'json-editor-btntype-delete');
      button.setAttribute('data-i', i);
      button.addEventListener('click', function (e) {
        e.preventDefault();
        e.stopPropagation();

        if (!_this8.askConfirmation()) {
          return false;
        }

        var i = e.currentTarget.getAttribute('data-i') * 1;

        var newval = _this8.getValue().filter(function (row, j) {
          return j !== i;
        });

        var newActiveTab = null;
        var editor = _this8.rows[i];

        _this8.setValue(newval);

        if (_this8.rows[i]) {
          newActiveTab = _this8.rows[i].tab;
        } else if (_this8.rows[i - 1]) {
          newActiveTab = _this8.rows[i - 1].tab;
        }

        if (newActiveTab) {
          _this8.active_tab = newActiveTab;

          _this8.refreshTabs();
        }

        _this8.onChange(true);

        _this8.jsoneditor.trigger('deleteRow', editor);
      });

      if (holder) {
        holder.appendChild(button);
      }

      return button;
    }
  }, {
    key: "_createCopyButton",
    value: function _createCopyButton(i, holder) {
      var _this9 = this;

      var button = this.getButton(this.getItemTitle(), 'copy', 'button_copy_row_title', [this.getItemTitle()]);
      button.classList.add('copy', 'json-editor-btntype-copy');
      button.setAttribute('data-i', i);
      button.addEventListener('click', function (e) {
        var value = _this9.getValue();

        e.preventDefault();
        e.stopPropagation();
        var i = e.currentTarget.getAttribute('data-i') * 1;
        value.forEach(function (row, j) {
          if (j === i) {
            value.push(row);
          }
        });

        _this9.setValue(value);

        _this9.refreshValue(true);

        _this9.onChange(true);
      });
      holder.appendChild(button);
      return button;
    }
  }, {
    key: "_createMoveUpButton",
    value: function _createMoveUpButton(i, holder) {
      var _this10 = this;

      // Mahara: custom button title
      var button = this.getButton(this.translate('button_move_up'),this.schema.format === 'tabs-top' ? 'moveleft' : 'moveup',this.translate('button_move_up_title',[this.getItemTitle()]));
      button.classList.add('moveup', 'json-editor-btntype-move');
      button.setAttribute('data-i', i);
      button.addEventListener('click', function (e) {
        e.preventDefault();
        e.stopPropagation();
        var i = e.currentTarget.getAttribute('data-i') * 1;
        if (i <= 0) return;

        var rows = _this10.getValue();

        var tmp = rows[i - 1];
        rows[i - 1] = rows[i];
        rows[i] = tmp;

        _this10.setValue(rows);

        _this10.active_tab = _this10.rows[i - 1].tab;

        _this10.refreshTabs();

        _this10.onChange(true);

        _this10.jsoneditor.trigger('moveRow', _this10.rows[i - 1]);
      });

      if (holder) {
        holder.appendChild(button);
      }

      return button;
    }
  }, {
    key: "_createMoveDownButton",
    value: function _createMoveDownButton(i, holder) {
      var _this11 = this;

      // Mahara: custom button text
      var button = this.getButton(this.translate('button_move_down'),this.schema.format === 'tabs-top' ? 'moveright' : 'movedown',this.translate('button_move_down_title', [this.getItemTitle()]));
      button.classList.add('movedown', 'json-editor-btntype-move');
      button.setAttribute('data-i', i);
      button.addEventListener('click', function (e) {
        e.preventDefault();
        e.stopPropagation();
        var i = e.currentTarget.getAttribute('data-i') * 1;

        var rows = _this11.getValue();

        if (i >= rows.length - 1) return;
        var tmp = rows[i + 1];
        rows[i + 1] = rows[i];
        rows[i] = tmp;

        _this11.setValue(rows);

        _this11.active_tab = _this11.rows[i + 1].tab;

        _this11.refreshTabs();

        _this11.onChange(true);

        _this11.jsoneditor.trigger('moveRow', _this11.rows[i + 1]);
      });

      if (holder) {
        holder.appendChild(button);
      }

      return button;
    }
  }, {
    key: "addControls",
    value: function addControls() {
      this.collapsed = false;
      this.toggle_button = this._createToggleButton();
      /* If it should start collapsed */

      if (this.options.collapsed) {
        Object(_utilities_js__WEBPACK_IMPORTED_MODULE_24__["trigger"])(this.toggle_button, 'click');
      }
      /* Collapse button disabled */


      if (this.schema.options && typeof this.schema.options.disable_collapse !== 'undefined') {
        if (this.schema.options.disable_collapse) this.toggle_button.style.display = 'none';
      } else if (this.jsoneditor.options.disable_collapse) {
        this.toggle_button.style.display = 'none';
      }
      /* Add "new row" and "delete last" buttons below editor */


      this.add_row_button = this._createAddRowButton();
      this.delete_last_row_button = this._createDeleteLastRowButton();
      this.remove_all_rows_button = this._createRemoveAllRowsButton();

      if (this.tabs) {
        this.add_row_button.classList.add('je-array-control-btn');
        this.delete_last_row_button.classList.add('je-array-control-btn');
        this.remove_all_rows_button.classList.add('je-array-control-btn');
      }
    }
  }, {
    key: "_createToggleButton",
    value: function _createToggleButton() {
      var _this12 = this;

      // Mahara: custom button text
      var button = this.getButton(_this12.translate('button_collapse'),'collapse',this.translate('button_collapse_title',[_this12.getTitle()]));
      button.classList.add('json-editor-btntype-toggle');
      // Mahara: accessibility
      button.setAttribute('aria-expanded', 'true'); // Mahara
      button.removeAttribute('title'); // Mahara
      this.title.after(button); // Mahara
      var rowHolderDisplay = this.row_holder.style.display;
      var controlsDisplay = this.controls.style.display;
      button.addEventListener('click', function (e) {
        e.preventDefault();
        e.stopPropagation();
        if (_this12.panel) _this12.setVisibility(_this12.panel, _this12.collapsed);
        if (_this12.tabs_holder) _this12.setVisibility(_this12.tabs_holder, _this12.collapsed);

        if (_this12.collapsed) {
          _this12.toggle_button.setAttribute('aria-expanded', 'true'); // Mahara
          _this12.collapsed = false;
          _this12.row_holder.style.display = rowHolderDisplay;
          _this12.controls.style.display = controlsDisplay;
          _this12.setButtonText(this,_this12.translate('button_collapse'),'collapse',_this12.translate('button_collapse_title',[_this12.getTitle()])); // Mahara
        } else {
          _this12.toggle_button.setAttribute('aria-expanded', 'false'); // Mahara
          _this12.collapsed = true;
          _this12.row_holder.style.display = 'none';
          _this12.controls.style.display = 'none';
          _this12.setButtonText(this,_this12.translate('button_expand'),'expand',_this12.translate('button_expand_title',[_this12.getTitle()])); // Mahara
        }
      });
      return button;
    }
  }, {
    key: "_createAddRowButton",
    value: function _createAddRowButton() {
      var _this13 = this;
      // Mahara: custom button text
      var button = this.getButton(this.translate('button_add_row_text'),'add',this.translate('button_add_row_title',[this.getItemTitle()]));
      button.classList.add('json-editor-btntype-add');
      button.addEventListener('click', function (e) {
        e.preventDefault();
        e.stopPropagation();
        var i = _this13.rows.length;
        var editor;

        if (_this13.row_cache[i]) {
          editor = _this13.rows[i] = _this13.row_cache[i];

          _this13.rows[i].setValue(_this13.rows[i].getDefault(), true);

          _this13.rows[i].container.style.display = '';
          if (_this13.rows[i].tab) _this13.rows[i].tab.style.display = '';

          _this13.rows[i].register();
        } else {
          editor = _this13.addRow();
        }

        _this13.active_tab = _this13.rows[i].tab;

        _this13.refreshTabs();

        _this13.refreshValue();

        _this13.onChange(true);

        _this13.jsoneditor.trigger('addRow', editor);
      });
      this.controls.appendChild(button);
      return button;
    }
  }, {
    key: "_createDeleteLastRowButton",
    value: function _createDeleteLastRowButton() {
      var _this14 = this;

      var button = this.getButton('button_delete_last', 'subtract', 'button_delete_last_title', [this.getItemTitle()]);
      button.classList.add('json-editor-btntype-deletelast');
      button.addEventListener('click', function (e) {
        e.preventDefault();
        e.stopPropagation();

        if (!_this14.askConfirmation()) {
          return false;
        }

        var rows = _this14.getValue();

        var newActiveTab = null;
        var editor = rows.pop();

        _this14.setValue(rows);

        if (_this14.rows[_this14.rows.length - 1]) {
          newActiveTab = _this14.rows[_this14.rows.length - 1].tab;
        }

        if (newActiveTab) {
          _this14.active_tab = newActiveTab;

          _this14.refreshTabs();
        }

        _this14.onChange(true);

        _this14.jsoneditor.trigger('deleteRow', editor);
      });
      this.controls.appendChild(button);
      return button;
    }
  }, {
    key: "_createRemoveAllRowsButton",
    value: function _createRemoveAllRowsButton() {
      var _this15 = this;
      // Mahara: custom button text
      var button = this.getButton(this.translate('button_delete_all'),'delete',this.translate('button_delete_all_title',[this.getItemTitle()]));
      button.classList.add('json-editor-btntype-deleteall');
      button.addEventListener('click', function (e) {
        e.preventDefault();
        e.stopPropagation();

        if (!_this15.askConfirmation()) {
          return false;
        }

        _this15.empty(true);

        _this15.setValue([]);

        _this15.onChange(true);

        _this15.jsoneditor.trigger('deleteAllRows');
      });
      this.controls.appendChild(button);
      return button;
    }
  }, {
    key: "showValidationErrors",
    value: function showValidationErrors(errors) {
      var _this16 = this;

      /* Get all the errors that pertain to this editor */
      var myErrors = [];
      var otherErrors = [];
      errors.forEach(function (error) {
        if (error.path === _this16.path) {
          myErrors.push(error);
        } else {
          otherErrors.push(error);
        }
      });
      /* Show errors for this editor */

      if (this.error_holder) {
        if (myErrors.length) {
          this.error_holder.innerHTML = '';
          this.error_holder.style.display = '';
          myErrors.forEach(function (error) {
            _this16.error_holder.appendChild(_this16.theme.getErrorMessage(error.message));
          });
          /* Hide error area */
        } else {
          this.error_holder.style.display = 'none';
        }
      }
      /* Show errors for child editors */


      this.rows.forEach(function (row) {
        return row.showValidationErrors(otherErrors);
      });
    }
  }]);

  return ArrayEditor;
}(_editor_js__WEBPACK_IMPORTED_MODULE_23__["AbstractEditor"]);
ArrayEditor.rules = _array_css_js__WEBPACK_IMPORTED_MODULE_25__["default"];

/***/ }),

/***/ "./src/editors/array/choices.js":
/*!**************************************!*\
  !*** ./src/editors/array/choices.js ***!
  \**************************************/
/*! exports provided: ArrayChoicesEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArrayChoicesEditor", function() { return ArrayChoicesEditor; });
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var _multiselect_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../multiselect.js */ "./src/editors/multiselect.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../utilities.js */ "./src/utilities.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }


















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var ArrayChoicesEditor = /*#__PURE__*/function (_MultiSelectEditor) {
  _inherits(ArrayChoicesEditor, _MultiSelectEditor);

  var _super = _createSuper(ArrayChoicesEditor);

  function ArrayChoicesEditor() {
    _classCallCheck(this, ArrayChoicesEditor);

    return _super.apply(this, arguments);
  }

  _createClass(ArrayChoicesEditor, [{
    key: "setValue",
    value: function setValue(value, initial) {
      if (this.choices_instance) {
        /* Make sure we are dealing with an array of strings so we can check for strict equality */
        value = [].concat(value).map(function (e) {
          return "".concat(e);
        });
        this.updateValue(value);
        /* Sets this.value to sanitized value */

        this.choices_instance.removeActiveItems();
        /* Remove existing selection */

        this.choices_instance.setChoiceByValue(this.value);
        /* Set new selection */

        this.onChange(true);
      } else _get(_getPrototypeOf(ArrayChoicesEditor.prototype), "setValue", this).call(this, value, initial);
    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady() {
      var _this = this;

      if (window.Choices && !this.choices_instance) {
        /* Get options, either global options from "this.defaults.options.choices" or */

        /* single property options from schema "options.choices" */
        var options = this.expandCallbacks('choices', Object(_utilities_js__WEBPACK_IMPORTED_MODULE_17__["extend"])({}, {
          removeItems: true,
          removeItemButton: true
        }, this.defaults.options.choices || {}, this.options.choices || {}, {
          addItems: true,
          editItems: false,
          duplicateItemsAllowed: false
        }));
        /* New items are allowed if option "addItems" is true and items type is "string" */

        /* this.newEnumAllowed = options.addItems = !!options.addItems && this.schema.items && this.schema.items.type == 'string'; */

        /* Choices doesn't support adding new items to select type input */

        this.newEnumAllowed = false;
        this.choices_instance = new window.Choices(this.input, options);
        /* Remove change handler set in parent class (src/multiselect.js) */

        this.control.removeEventListener('change', this.multiselectChangeHandler);
        /* Create a new change handler */

        this.multiselectChangeHandler = function (e) {
          var value = _this.choices_instance.getValue(true);

          _this.updateValue(value);

          _this.onChange(true);
        };

        this.control.addEventListener('change', this.multiselectChangeHandler, false);
      }

      _get(_getPrototypeOf(ArrayChoicesEditor.prototype), "afterInputReady", this).call(this);
    }
  }, {
    key: "updateValue",
    value: function updateValue(value) {
      value = [].concat(value);
      var changed = false;
      var newValue = [];

      for (var i = 0; i < value.length; i++) {
        if (!this.select_values["".concat(value[i])]) {
          changed = true;

          if (this.newEnumAllowed) {
            if (!this.addNewOption(value[i])) continue;
          } else continue;
        }

        var sanitized = this.sanitize(this.select_values[value[i]]);
        newValue.push(sanitized);
        if (sanitized !== value[i]) changed = true;
      }

      this.value = newValue;
      return changed;
    }
  }, {
    key: "addNewOption",
    value: function addNewOption(value) {
      /* Add new value and label */
      this.option_keys.push("".concat(value));
      this.option_titles.push("".concat(value));
      this.select_values["".concat(value)] = value;
      /* Update Schema enum to prevent triggering "Value must be one of the enumerated values" */

      this.schema.items["enum"].push(value);
      /* Add new value and label to choices */

      this.choices_instance.setChoices([{
        value: "".concat(value),
        label: "".concat(value)
      }], 'value', 'label', false);
      return true;
    }
  }, {
    key: "enable",
    value: function enable() {
      if (!this.always_disabled && this.choices_instance) this.choices_instance.enable();

      _get(_getPrototypeOf(ArrayChoicesEditor.prototype), "enable", this).call(this);
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      if (this.choices_instance) this.choices_instance.disable();

      _get(_getPrototypeOf(ArrayChoicesEditor.prototype), "disable", this).call(this, alwaysDisabled);
    }
  }, {
    key: "destroy",
    value: function destroy() {
      if (this.choices_instance) {
        this.choices_instance.destroy();
        this.choices_instance = null;
      }

      _get(_getPrototypeOf(ArrayChoicesEditor.prototype), "destroy", this).call(this);
    }
  }]);

  return ArrayChoicesEditor;
}(_multiselect_js__WEBPACK_IMPORTED_MODULE_16__["MultiSelectEditor"]);

/***/ }),

/***/ "./src/editors/array/select2.js":
/*!**************************************!*\
  !*** ./src/editors/array/select2.js ***!
  \**************************************/
/*! exports provided: ArraySelect2Editor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArraySelect2Editor", function() { return ArraySelect2Editor; });
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var _multiselect_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../multiselect.js */ "./src/editors/multiselect.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../utilities.js */ "./src/utilities.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }


















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var ArraySelect2Editor = /*#__PURE__*/function (_MultiSelectEditor) {
  _inherits(ArraySelect2Editor, _MultiSelectEditor);

  var _super = _createSuper(ArraySelect2Editor);

  function ArraySelect2Editor() {
    _classCallCheck(this, ArraySelect2Editor);

    return _super.apply(this, arguments);
  }

  _createClass(ArraySelect2Editor, [{
    key: "setValue",
    value: function setValue(value, initial) {
      if (this.select2_instance) {
        /* Make sure we are dealing with an array of strings so we can check for strict equality */
        value = [].concat(value).map(function (e) {
          return "".concat(e);
        });
        this.updateValue(value);
        /* Sets this.value to sanitized value */

        if (this.select2v4) this.select2_instance.val(this.value).change();else this.select2_instance.select2('val', this.value);
        this.onChange(true);
      } else _get(_getPrototypeOf(ArraySelect2Editor.prototype), "setValue", this).call(this, value, initial);
    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady() {
      var _this = this;

      var options;

      if (window.jQuery && window.jQuery.fn && window.jQuery.fn.select2 && !this.select2_instance) {
        /* Get options, either global options from "this.defaults.options.select2" or */

        /* single property options from schema "options.select2" */
        options = this.expandCallbacks('select2', Object(_utilities_js__WEBPACK_IMPORTED_MODULE_17__["extend"])({}, {
          tags: true,
          width: '100%'
        }, this.defaults.options.select2 || {}, this.options.select2 || {}));
        /* New items are allowed if option "tags" is true and items type is "string" */

        this.newEnumAllowed = options.tags = !!options.tags && this.schema.items && this.schema.items.type === 'string';
        this.select2_instance = window.jQuery(this.input).select2(options);
        this.select2v4 = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_17__["hasOwnProperty"])(this.select2_instance.select2, 'amd');

        this.selectChangeHandler = function () {
          var value = _this.select2v4 ? _this.select2_instance.val() : _this.select2_instance.select2('val');

          _this.updateValue(value);

          _this.onChange(true);
        };
        /* Add event handler. */

        /* Note: Must use the "on()" method and not addEventListener() */


        this.select2_instance.on('select2-blur', this.selectChangeHandler);
        this.select2_instance.on('change', this.selectChangeHandler);
      }

      _get(_getPrototypeOf(ArraySelect2Editor.prototype), "afterInputReady", this).call(this);
    }
  }, {
    key: "updateValue",
    value: function updateValue(value) {
      value = [].concat(value);
      var changed = false;
      var newValue = [];

      for (var i = 0; i < value.length; i++) {
        /*      if (!this.select_options[value[i]+'']) { */
        if (!this.select_values["".concat(value[i])]) {
          changed = true;

          if (this.newEnumAllowed) {
            if (!this.addNewOption(value[i])) continue;
          } else continue;
        }

        var sanitized = this.sanitize(this.select_values[value[i]]);
        newValue.push(sanitized);
        if (sanitized !== value[i]) changed = true;
      }

      this.value = newValue;
      return changed;
    }
  }, {
    key: "addNewOption",
    value: function addNewOption(value) {
      /* Add new value and label */
      this.option_keys.push("".concat(value));
      this.option_titles.push("".concat(value));
      this.select_values["".concat(value)] = value;
      /* Update Schema enum to prevent triggering "Value must be one of the enumerated values" */

      this.schema.items["enum"].push(value);
      var optionTag = this.input.querySelector("option[value=\"".concat(value, "\"]"));
      /* Remove data attribute to make option tag permanent. (user input) */

      if (optionTag) optionTag.removeAttribute('data-select2-tag');
      /* Create new option tag (setValue) */
      else this.input.appendChild(new Option(value, value, false, false)).trigger('change');
      return true;
    }
  }, {
    key: "enable",
    value: function enable() {
      if (!this.always_disabled && this.select2_instance) {
        if (this.select2v4) this.select2_instance.prop('disabled', false);else this.select2_instance.select2('enable', true);
      }

      _get(_getPrototypeOf(ArraySelect2Editor.prototype), "enable", this).call(this);
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      if (this.select2_instance) {
        if (this.select2v4) this.select2_instance.prop('disabled', true);else this.select2_instance.select2('enable', false);
      }

      _get(_getPrototypeOf(ArraySelect2Editor.prototype), "disable", this).call(this);
    }
  }, {
    key: "destroy",
    value: function destroy() {
      if (this.select2_instance) {
        this.select2_instance.select2('destroy');
        this.select2_instance = null;
      }

      _get(_getPrototypeOf(ArraySelect2Editor.prototype), "destroy", this).call(this);
    }
  }]);

  return ArraySelect2Editor;
}(_multiselect_js__WEBPACK_IMPORTED_MODULE_16__["MultiSelectEditor"]);

/***/ }),

/***/ "./src/editors/array/selectize.js":
/*!****************************************!*\
  !*** ./src/editors/array/selectize.js ***!
  \****************************************/
/*! exports provided: ArraySelectizeEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArraySelectizeEditor", function() { return ArraySelectizeEditor; });
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var _multiselect_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../multiselect.js */ "./src/editors/multiselect.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../utilities.js */ "./src/utilities.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }


















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var ArraySelectizeEditor = /*#__PURE__*/function (_MultiSelectEditor) {
  _inherits(ArraySelectizeEditor, _MultiSelectEditor);

  var _super = _createSuper(ArraySelectizeEditor);

  function ArraySelectizeEditor() {
    _classCallCheck(this, ArraySelectizeEditor);

    return _super.apply(this, arguments);
  }

  _createClass(ArraySelectizeEditor, [{
    key: "setValue",
    value: function setValue(value, initial) {
      if (this.selectize_instance) {
        /* Make sure we are dealing with an array of strings so we can check for strict equality */
        value = [].concat(value).map(function (e) {
          return "".concat(e);
        });
        this.updateValue(value);
        /* Sets this.value to sanitized value */

        this.selectize_instance.setValue(this.value);
        this.onChange(true);
      } else _get(_getPrototypeOf(ArraySelectizeEditor.prototype), "setValue", this).call(this, value, initial);
    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady() {
      var _this = this;

      var options;

      if (window.jQuery && window.jQuery.fn && window.jQuery.fn.selectize && !this.selectize_instance) {
        /* Get options, either global options from "this.defaults.options.selectize" or */

        /* single property options from schema "options.selectize" */
        options = this.expandCallbacks('selectize', Object(_utilities_js__WEBPACK_IMPORTED_MODULE_17__["extend"])({}, {
          plugins: ['remove_button'],
          delimiter: false,
          createOnBlur: true,
          create: true
        }, this.defaults.options.selectize || {}, this.options.selectize || {}));
        /* New items are allowed if option "create" is true and items type is "string" */

        this.newEnumAllowed = options.create = !!options.create && this.schema.items && this.schema.items.type === 'string';
        this.selectize_instance = window.jQuery(this.input).selectize(options)[0].selectize;
        /* Remove change handler set in parent class (src/multiselect.js) */

        this.control.removeEventListener('change', this.multiselectChangeHandler);
        /* Create a new change handler */

        this.multiselectChangeHandler = function (e) {
          var value = _this.selectize_instance.getValue();

          _this.updateValue(value);

          _this.onChange(true);
        };
        /* Add new event handler. */

        /* Note: Must use the "on()" method and not addEventListener() */


        this.selectize_instance.on('change', this.multiselectChangeHandler);
      }

      _get(_getPrototypeOf(ArraySelectizeEditor.prototype), "afterInputReady", this).call(this);
    }
  }, {
    key: "updateValue",
    value: function updateValue(value) {
      value = [].concat(value);
      var changed = false;
      var newValue = [];

      for (var i = 0; i < value.length; i++) {
        /*      if (!this.select_options[value[i]+'']) { */
        if (!this.select_values["".concat(value[i])]) {
          changed = true;

          if (this.newEnumAllowed) {
            if (!this.addNewOption(value[i])) continue;
          } else continue;
        }

        var sanitized = this.sanitize(this.select_values[value[i]]);
        newValue.push(sanitized);
        if (sanitized !== value[i]) changed = true;
      }

      this.value = newValue;
      return changed;
    }
  }, {
    key: "addNewOption",
    value: function addNewOption(value) {
      /* Add new value and label */
      this.option_keys.push("".concat(value));
      this.option_titles.push("".concat(value));
      this.select_values["".concat(value)] = value;
      /* Update Schema enum to prevent triggering "Value must be one of the enumerated values" */

      this.schema.items["enum"].push(value);
      /* Add new value and label to selectize */

      this.selectize_instance.addOption({
        text: value,
        value: value
      });
      return true;
    }
  }, {
    key: "enable",
    value: function enable() {
      if (!this.always_disabled && this.selectize_instance) this.selectize_instance.unlock();

      _get(_getPrototypeOf(ArraySelectizeEditor.prototype), "enable", this).call(this);
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      if (this.selectize_instance) this.selectize_instance.lock();

      _get(_getPrototypeOf(ArraySelectizeEditor.prototype), "disable", this).call(this, alwaysDisabled);
    }
  }, {
    key: "destroy",
    value: function destroy() {
      if (this.selectize_instance) {
        this.selectize_instance.destroy();
        this.selectize_instance = null;
      }

      _get(_getPrototypeOf(ArraySelectizeEditor.prototype), "destroy", this).call(this);
    }
  }]);

  return ArraySelectizeEditor;
}(_multiselect_js__WEBPACK_IMPORTED_MODULE_16__["MultiSelectEditor"]);

/***/ }),

/***/ "./src/editors/autocomplete.js":
/*!*************************************!*\
  !*** ./src/editors/autocomplete.js ***!
  \*************************************/
/*! exports provided: AutocompleteEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AutocompleteEditor", function() { return AutocompleteEditor; });
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./string.js */ "./src/editors/string.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var AutocompleteEditor = /*#__PURE__*/function (_StringEditor) {
  _inherits(AutocompleteEditor, _StringEditor);

  var _super = _createSuper(AutocompleteEditor);

  function AutocompleteEditor() {
    _classCallCheck(this, AutocompleteEditor);

    return _super.apply(this, arguments);
  }

  _createClass(AutocompleteEditor, [{
    key: "postBuild",
    value: function postBuild() {
      if (window.Autocomplete) {
        /* create wrapper container */
        this.autocomplete_wrapper = document.createElement('div');
        /* insert wrapper after this.input in the DOM tree */

        this.input.parentNode.insertBefore(this.autocomplete_wrapper, this.input.nextSibling);
        /* move this.input into wrapper */

        this.autocomplete_wrapper.appendChild(this.input);
        /* create dropdown container */

        this.autocomplete_dropdown = document.createElement('ul');
        /* insert dropdown after this.input in the DOM tree */

        this.input.parentNode.insertBefore(this.autocomplete_dropdown, this.input.nextSibling);
      }

      _get(_getPrototypeOf(AutocompleteEditor.prototype), "postBuild", this).call(this);
    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady() {
      var options;

      if (window.Autocomplete && !this.autocomplete_instance) {
        /* Get options, either global options from "this.defaults.options.autocomplete" or */

        /* single property options from schema "options.autocomplete" */
        options = this.expandCallbacks('autocomplete', Object(_utilities_js__WEBPACK_IMPORTED_MODULE_15__["extend"])({}, {
          search: function search(jseditor, input) {
            // eslint-disable-next-line no-console
            console.log("No \"search\" callback defined for autocomplete in property \"".concat(jseditor.key, "\""));
            return [];
          },
          baseClass: 'autocomplete'
        }, this.defaults.options.autocomplete || {}, this.options.autocomplete || {}));
        this.autocomplete_wrapper.classList.add(options.baseClass);
        this.autocomplete_dropdown.classList.add("".concat(options.baseClass, "-result-list"));
        /* this.input.classList.add(options.baseClass + '-input'); */

        this.autocomplete_instance = new window.Autocomplete(this.autocomplete_wrapper, options);
      }

      _get(_getPrototypeOf(AutocompleteEditor.prototype), "afterInputReady", this).call(this);
    }
  }, {
    key: "destroy",
    value: function destroy() {
      if (this.autocomplete_instance) {
        if (this.input && this.input.parentNode) this.input.parentNode.removeChild(this.input);
        if (this.autocomplete_dropdown && this.autocomplete_dropdown.parentNode) this.autocomplete_dropdown.parentNode.removeChild(this.autocomplete_dropdown);
        if (this.autocomplete_wrapper && this.autocomplete_wrapper.parentNode) this.autocomplete_wrapper.parentNode.removeChild(this.autocomplete_wrapper);
        this.autocomplete_instance = null;
      }

      _get(_getPrototypeOf(AutocompleteEditor.prototype), "destroy", this).call(this);
    }
  }]);

  return AutocompleteEditor;
}(_string_js__WEBPACK_IMPORTED_MODULE_14__["StringEditor"]);

/***/ }),

/***/ "./src/editors/base64.js":
/*!*******************************!*\
  !*** ./src/editors/base64.js ***!
  \*******************************/
/*! exports provided: Base64Editor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Base64Editor", function() { return Base64Editor; });
/* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.splice.js */ "./node_modules/core-js/modules/es.array.splice.js");
/* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_parse_int_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.parse-int.js */ "./node_modules/core-js/modules/es.parse-int.js");
/* harmony import */ var core_js_modules_es_parse_int_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_parse_int_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.string.match.js */ "./node_modules/core-js/modules/es.string.match.js");
/* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.string.split.js */ "./node_modules/core-js/modules/es.string.split.js");
/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ "./node_modules/core-js/modules/es.string.includes.js");
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_19__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_20__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_21__);
/* harmony import */ var _editor_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../editor.js */ "./src/editor.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
























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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }


var Base64Editor = /*#__PURE__*/function (_AbstractEditor) {
  _inherits(Base64Editor, _AbstractEditor);

  var _super = _createSuper(Base64Editor);

  function Base64Editor() {
    _classCallCheck(this, Base64Editor);

    return _super.apply(this, arguments);
  }

  _createClass(Base64Editor, [{
    key: "getNumColumns",
    value: function getNumColumns() {
      return 4;
    }
  }, {
    key: "setFileReaderListener",
    value: function setFileReaderListener(frMultiple) {
      var _this = this;

      frMultiple.addEventListener('load', function (event) {
        if (_this.count === _this.current_item_index) {
          /* Overwrite existing file by default, leave other properties unchanged */
          _this.value[_this.count][_this.key] = event.target.result;
        } else {
          var tempObject = {};
          /* Create empty object */

          for (var key in _this.parent.schema.properties) {
            tempObject[key] = '';
          }
          /* Set object media file */


          tempObject[_this.key] = event.target.result;

          _this.value.splice(_this.count, 0, tempObject);
          /* insert new file object */

        }
        /* Increment using the listener and not the 'for' loop as the listener will be processed asynchronously */


        _this.count += 1;
        /* When all files have been processed, update the value of the editor */

        if (_this.count === _this.total + _this.current_item_index) {
          _this.arrayEditor.setValue(_this.value);
        }
      });
    }
  }, {
    key: "build",
    value: function build() {
      var _this2 = this;

      if (!this.options.compact) this.title = this.header = this.label = this.theme.getFormInputLabel(this.getTitle(), this.isRequired());
      if (this.options.infoText) this.infoButton = this.theme.getInfoButton(this.translateProperty(this.options.infoText));
      /* Input that holds the base64 string */

      this.input = this.theme.getFormInputField('hidden');
      this.container.appendChild(this.input);
      /* Don't show uploader if this is readonly */

      if (!this.schema.readOnly && !this.schema.readonly) {
        if (!window.FileReader) throw new Error('FileReader required for base64 editor');
        /* File uploader */

        this.uploader = this.theme.getFormInputField('file');
        /* Set attribute of file input field to 'multiple' if: */

        /* 'multiple' key has been set to 'true' in the schema */

        /* and the parent object is of type 'object' */

        /* and the parent of the parent type has been set to 'array' */

        if (this.schema.options && this.schema.options.multiple && this.schema.options.multiple === true && this.parent && this.parent.schema.type === 'object' && this.parent.parent && this.parent.parent.schema.type === 'array') {
          this.uploader.setAttribute('multiple', '');
        }

        this.uploader.addEventListener('change', function (e) {
          e.preventDefault();
          e.stopPropagation();

          if (e.currentTarget.files && e.currentTarget.files.length) {
            /* Check the amount of files uploaded. */

            /* If 1, use the regular upload, otherwise use the multiple upload method */
            if (e.currentTarget.files.length > 1 && _this2.schema.options && _this2.schema.options.multiple && _this2.schema.options.multiple === true && _this2.parent && _this2.parent.schema.type === 'object' && _this2.parent.parent && _this2.parent.parent.schema.type === 'array') {
              /* Load editor of parent.parent to get the array */
              _this2.arrayEditor = _this2.jsoneditor.getEditor(_this2.parent.parent.path);
              /* Check the current value of this editor */

              _this2.value = _this2.arrayEditor.getValue();
              /* Set variables for amount of files, index of current array item and */

              /* count value containing current status of processed files */

              _this2.total = e.currentTarget.files.length;
              _this2.current_item_index = parseInt(_this2.parent.key);
              _this2.count = _this2.current_item_index;

              for (var i = 0; i < _this2.total; i++) {
                var frMultiple = new FileReader();

                _this2.setFileReaderListener(frMultiple);

                frMultiple.readAsDataURL(e.currentTarget.files[i]);
              }
            } else {
              var fr = new FileReader();

              fr.onload = function (evt) {
                _this2.value = evt.target.result;

                _this2.refreshPreview();

                _this2.onChange(true);

                fr = null;
              };

              fr.readAsDataURL(e.currentTarget.files[0]);
            }
          }
        });
      }

      this.preview = this.theme.getFormInputDescription(this.translateProperty(this.schema.description));
      this.container.appendChild(this.preview);
      this.control = this.theme.getFormControl(this.label, this.uploader || this.input, this.preview, this.infoButton);
      this.container.appendChild(this.control);
    }
  }, {
    key: "refreshPreview",
    value: function refreshPreview() {
      if (this.last_preview === this.value) return;
      this.last_preview = this.value;
      this.preview.innerHTML = '';
      if (!this.value) return;
      var mime = this.value.match(/^data:([^;,]+)[;,]/);
      if (mime) mime = mime[1];

      if (!mime) {
        this.preview.innerHTML = '<em>Invalid data URI</em>';
      } else {
        this.preview.innerHTML = "<strong>Type:</strong> ".concat(mime, ", <strong>Size:</strong> ").concat(Math.floor((this.value.length - this.value.split(',')[0].length - 1) / 1.33333), " bytes");

        if (mime.substr(0, 5) === 'image') {
          this.preview.innerHTML += '<br>';
          var img = document.createElement('img');
          img.style.maxWidth = '100%';
          img.style.maxHeight = '100px';
          img.src = this.value;
          this.preview.appendChild(img);
        }
      }
    }
  }, {
    key: "enable",
    value: function enable() {
      if (!this.always_disabled) {
        if (this.uploader) this.uploader.disabled = false;

        _get(_getPrototypeOf(Base64Editor.prototype), "enable", this).call(this);
      }
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      if (alwaysDisabled) this.always_disabled = true;
      if (this.uploader) this.uploader.disabled = true;

      _get(_getPrototypeOf(Base64Editor.prototype), "disable", this).call(this);
    }
  }, {
    key: "setValue",
    value: function setValue(val) {
      if (this.value !== val) {
        if (this.schema.readOnly && this.schema["enum"] && !this.schema["enum"].includes(val)) this.value = this.schema["enum"][0];else this.value = val;
        this.input.value = this.value;
        this.refreshPreview();
        this.onChange();
      }
    }
  }, {
    key: "destroy",
    value: function destroy() {
      if (this.preview && this.preview.parentNode) this.preview.parentNode.removeChild(this.preview);
      if (this.title && this.title.parentNode) this.title.parentNode.removeChild(this.title);
      if (this.input && this.input.parentNode) this.input.parentNode.removeChild(this.input);
      if (this.uploader && this.uploader.parentNode) this.uploader.parentNode.removeChild(this.uploader);

      _get(_getPrototypeOf(Base64Editor.prototype), "destroy", this).call(this);
    }
  }]);

  return Base64Editor;
}(_editor_js__WEBPACK_IMPORTED_MODULE_22__["AbstractEditor"]);

/***/ }),

/***/ "./src/editors/button.js":
/*!*******************************!*\
  !*** ./src/editors/button.js ***!
  \*******************************/
/*! exports provided: ButtonEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ButtonEditor", function() { return ButtonEditor; });
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ "./node_modules/core-js/modules/es.array.is-array.js");
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ "./node_modules/core-js/modules/es.string.includes.js");
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var _editor_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../editor.js */ "./src/editor.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }



















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

/* Non-Active editor for displaying buttons in form */


var ButtonEditor = /*#__PURE__*/function (_AbstractEditor) {
  _inherits(ButtonEditor, _AbstractEditor);

  var _super = _createSuper(ButtonEditor);

  function ButtonEditor(options, defaults) {
    var _this;

    _classCallCheck(this, ButtonEditor);

    _this = _super.call(this, options, defaults);
    _this.active = false;
    /* Set field to required in schema otherwise it will not be displayed */

    if (_this.parent && _this.parent.schema) {
      if (Array.isArray(_this.parent.schema.required)) {
        if (!_this.parent.schema.required.includes(_this.key)) {
          _this.parent.schema.required.push(_this.key);
        }
      } else {
        _this.parent.schema.required = [_this.key];
      }
    }

    return _this;
  }

  _createClass(ButtonEditor, [{
    key: "build",
    value: function build() {
      var _this2 = this;

      this.options.compact = true;
      /* Get options, either global options from "this.defaults.options.button" or */

      /* single property options from schema "options.button" */

      var title = this.translateProperty(this.schema.title) || this.key;
      var options = this.expandCallbacks('button', Object(_utilities_js__WEBPACK_IMPORTED_MODULE_18__["extend"])({}, {
        icon: '',
        validated: false,
        align: 'left',
        action: function action(jseditor, e) {
          window.alert("No button action defined for \"".concat(jseditor.path, "\""));
        }
      }, this.defaults.options.button || {}, this.options.button || {}));
      this.input = this.theme.getFormButton(title, options.icon, title);
      this.input.addEventListener('click', options.action, false);

      if (this.schema.readOnly || this.schema.readonly || this.schema.template) {
        this.disable(true);
        this.input.setAttribute('readonly', 'true');
      }
      /* Set custom attributes on input element. Parameter is array of protected keys. Empty array if none. */


      this.setInputAttributes(['readonly']);
      this.control = this.theme.getFormButtonHolder(options.align);
      this.control.appendChild(this.input);
      this.container.appendChild(this.control);

      this.changeHandler = function () {
        if (_this2.jsoneditor.validate(_this2.jsoneditor.getValue()).length > 0) _this2.disable();else _this2.enable();
      };
      /* Enable/disable the button depending on form validation */


      if (options.validated) this.jsoneditor.on('change', this.changeHandler);
    }
  }, {
    key: "enable",
    value: function enable() {
      if (!this.always_disabled) {
        this.input.disabled = false;

        _get(_getPrototypeOf(ButtonEditor.prototype), "enable", this).call(this);
      }
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      if (alwaysDisabled) this.always_disabled = true;
      this.input.disabled = true;

      _get(_getPrototypeOf(ButtonEditor.prototype), "disable", this).call(this);
    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      return 2;
    }
  }, {
    key: "activate",
    value: function activate() {
      this.active = false;
      this.enable();
    }
  }, {
    key: "deactivate",
    value: function deactivate() {
      /* only non required properties can be deactivated. */
      if (!this.isRequired()) {
        this.active = false;
        this.disable();
      }
    }
  }, {
    key: "destroy",
    value: function destroy() {
      this.jsoneditor.off('change', this.changeHandler);
      this.changeHandler = null;

      _get(_getPrototypeOf(ButtonEditor.prototype), "destroy", this).call(this);
    }
  }]);

  return ButtonEditor;
}(_editor_js__WEBPACK_IMPORTED_MODULE_17__["AbstractEditor"]);

/***/ }),

/***/ "./src/editors/checkbox.js":
/*!*********************************!*\
  !*** ./src/editors/checkbox.js ***!
  \*********************************/
/*! exports provided: CheckboxEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CheckboxEditor", function() { return CheckboxEditor; });
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.reduce.js */ "./node_modules/core-js/modules/es.array.reduce.js");
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array.join.js */ "./node_modules/core-js/modules/es.array.join.js");
/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var _editor_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../editor.js */ "./src/editor.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }


















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }


var CheckboxEditor = /*#__PURE__*/function (_AbstractEditor) {
  _inherits(CheckboxEditor, _AbstractEditor);

  var _super = _createSuper(CheckboxEditor);

  function CheckboxEditor() {
    _classCallCheck(this, CheckboxEditor);

    return _super.apply(this, arguments);
  }

  _createClass(CheckboxEditor, [{
    key: "setValue",
    value: function setValue(value, initial) {
      value = !!value;
      var changed = this.getValue() !== value;
      this.value = value;
      this.input.checked = this.value;
      this.onChange(changed);
    }
  }, {
    key: "register",
    value: function register() {
      _get(_getPrototypeOf(CheckboxEditor.prototype), "register", this).call(this);

      if (!this.input) return;
      this.input.setAttribute('name', this.formname);
    }
  }, {
    key: "unregister",
    value: function unregister() {
      _get(_getPrototypeOf(CheckboxEditor.prototype), "unregister", this).call(this);

      if (!this.input) return;
      this.input.removeAttribute('name');
    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      return Math.min(12, Math.max(this.getTitle().length / 7, 2));
    }
  }, {
    key: "build",
    value: function build() {
      var _this = this;

      if (!this.parent.options.table_row) {
        this.label = this.header = this.theme.getCheckboxLabel(this.getTitle(), this.isRequired());
        this.label.htmlFor = this.formname;
      }

      if (this.schema.description) this.description = this.theme.getFormInputDescription(this.translateProperty(this.schema.description));
      if (this.options.infoText && !this.options.compact) this.infoButton = this.theme.getInfoButton(this.translateProperty(this.options.infoText));
      if (this.options.compact) this.container.classList.add('compact');
      this.input = this.theme.getCheckbox();
      this.input.id = this.formname;
      this.control = this.theme.getFormControl(this.label, this.input, this.description, this.infoButton);

      if (this.schema.readOnly || this.schema.readonly) {
        this.disable(true);
        this.input.disabled = true;
      }

      this.input.addEventListener('change', function (e) {
        e.preventDefault();
        e.stopPropagation();
        _this.value = e.currentTarget.checked;

        _this.onChange(true);
      });
      this.container.appendChild(this.control);
    }
  }, {
    key: "enable",
    value: function enable() {
      if (!this.always_disabled) {
        this.input.disabled = false;

        _get(_getPrototypeOf(CheckboxEditor.prototype), "enable", this).call(this);
      }
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      if (alwaysDisabled) this.always_disabled = true;
      this.input.disabled = true;

      _get(_getPrototypeOf(CheckboxEditor.prototype), "disable", this).call(this);
    }
  }, {
    key: "destroy",
    value: function destroy() {
      if (this.label && this.label.parentNode) this.label.parentNode.removeChild(this.label);
      if (this.description && this.description.parentNode) this.description.parentNode.removeChild(this.description);
      if (this.input && this.input.parentNode) this.input.parentNode.removeChild(this.input);

      _get(_getPrototypeOf(CheckboxEditor.prototype), "destroy", this).call(this);
    }
  }, {
    key: "showValidationErrors",
    value: function showValidationErrors(errors) {
      var _this2 = this;

      this.previous_error_setting = this.jsoneditor.options.show_errors;

      var addMessage = function addMessage(messages, error) {
        if (error.path === _this2.path) {
          messages.push(error.message);
        }

        return messages;
      };

      var messages = errors.reduce(addMessage, []);
      this.input.controlgroup = this.control;

      if (messages.length) {
        this.theme.addInputError(this.input, "".concat(messages.join('. '), "."));
      } else {
        this.theme.removeInputError(this.input);
      }
    }
  }]);

  return CheckboxEditor;
}(_editor_js__WEBPACK_IMPORTED_MODULE_16__["AbstractEditor"]);

/***/ }),

/***/ "./src/editors/choices.css.js":
/*!************************************!*\
  !*** ./src/editors/choices.css.js ***!
  \************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* eslint-disable */
/* harmony default export */ __webpack_exports__["default"] = ({
  ".choices > *": "box-sizing:border-box"
});
/* eslint-enable */

/***/ }),

/***/ "./src/editors/choices.js":
/*!********************************!*\
  !*** ./src/editors/choices.js ***!
  \********************************/
/*! exports provided: ChoicesEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChoicesEditor", function() { return ChoicesEditor; });
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ "./node_modules/core-js/modules/es.string.includes.js");
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_array_index_of_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.index-of.js */ "./node_modules/core-js/modules/es.array.index-of.js");
/* harmony import */ var core_js_modules_es_array_index_of_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_index_of_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./select.js */ "./src/editors/select.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
/* harmony import */ var _choices_css_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./choices.css.js */ "./src/editors/choices.css.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }




















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }




var ChoicesEditor = /*#__PURE__*/function (_SelectEditor) {
  _inherits(ChoicesEditor, _SelectEditor);

  var _super = _createSuper(ChoicesEditor);

  function ChoicesEditor() {
    _classCallCheck(this, ChoicesEditor);

    return _super.apply(this, arguments);
  }

  _createClass(ChoicesEditor, [{
    key: "setValue",
    value: function setValue(value, initial) {
      if (this.choices_instance) {
        /* Sanitize value before setting it */
        var sanitized = this.typecast(value || '');
        if (!this.enum_values.includes(sanitized)) sanitized = this.enum_values[0];
        if (this.value === sanitized) return;
        if (initial) this.is_dirty = false;else if (this.jsoneditor.options.show_errors === 'change') this.is_dirty = true;
        this.input.value = this.enum_options[this.enum_values.indexOf(sanitized)];
        this.choices_instance.setChoiceByValue(this.input.value);
        this.value = sanitized;
        this.onChange();
      } else _get(_getPrototypeOf(ChoicesEditor.prototype), "setValue", this).call(this, value, initial);
    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady() {
      if (window.Choices && !this.choices_instance) {
        /* Get options, either global options from "this.defaults.options.choices" or */

        /* single property options from schema "options.choices" */
        var options = this.expandCallbacks('choices', Object(_utilities_js__WEBPACK_IMPORTED_MODULE_19__["extend"])({}, this.defaults.options.choices || {}, this.options.choices || {}));
        this.choices_instance = new window.Choices(this.input, options);
      }

      _get(_getPrototypeOf(ChoicesEditor.prototype), "afterInputReady", this).call(this);
    }
  }, {
    key: "onWatchedFieldChange",
    value: function onWatchedFieldChange() {
      var _this = this;

      _get(_getPrototypeOf(ChoicesEditor.prototype), "onWatchedFieldChange", this).call(this);

      if (this.choices_instance) {
        var choicesList = this.enum_options.map(function (v, i) {
          return {
            value: v,
            label: _this.enum_display[i]
          };
        });
        this.choices_instance.setChoices(choicesList, 'value', 'label', true);
        this.choices_instance.setChoiceByValue("".concat(this.value));
        /* Set new selection */
      }
    }
  }, {
    key: "enable",
    value: function enable() {
      if (!this.always_disabled && this.choices_instance) this.choices_instance.enable();

      _get(_getPrototypeOf(ChoicesEditor.prototype), "enable", this).call(this);
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      if (this.choices_instance) this.choices_instance.disable();

      _get(_getPrototypeOf(ChoicesEditor.prototype), "disable", this).call(this, alwaysDisabled);
    }
  }, {
    key: "destroy",
    value: function destroy() {
      if (this.choices_instance) {
        this.choices_instance.destroy();
        this.choices_instance = null;
      }

      _get(_getPrototypeOf(ChoicesEditor.prototype), "destroy", this).call(this);
    }
  }]);

  return ChoicesEditor;
}(_select_js__WEBPACK_IMPORTED_MODULE_18__["SelectEditor"]);
ChoicesEditor.rules = _choices_css_js__WEBPACK_IMPORTED_MODULE_20__["default"];

/***/ }),

/***/ "./src/editors/colorpicker.js":
/*!************************************!*\
  !*** ./src/editors/colorpicker.js ***!
  \************************************/
/*! exports provided: ColorEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorEditor", function() { return ColorEditor; });
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./string.js */ "./src/editors/string.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

/*

Edtended handling of  oolor type fields.

Has optional support for using https://github.com/Sphinxxxx/vanilla-picker.

*/


var ColorEditor = /*#__PURE__*/function (_StringEditor) {
  _inherits(ColorEditor, _StringEditor);

  var _super = _createSuper(ColorEditor);

  function ColorEditor() {
    _classCallCheck(this, ColorEditor);

    return _super.apply(this, arguments);
  }

  _createClass(ColorEditor, [{
    key: "postBuild",
    value: function postBuild() {
      if (window.Picker) {
        this.input.type = 'text';
      }

      this.input.style.padding = '3px';
    }
  }, {
    key: "setValue",
    value: function setValue(value, initial, fromTemplate) {
      var res = _get(_getPrototypeOf(ColorEditor.prototype), "setValue", this).call(this, value, initial, fromTemplate);

      if (this.picker_instance && this.picker_instance.domElement && res && res.changed) {
        this.picker_instance.setColor(res.value, true);
      }

      return res;
    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      return 2;
    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady() {
      _get(_getPrototypeOf(ColorEditor.prototype), "afterInputReady", this).call(this);

      this.createPicker(true);
    }
  }, {
    key: "disable",
    value: function disable() {
      _get(_getPrototypeOf(ColorEditor.prototype), "disable", this).call(this);

      if (this.picker_instance && this.picker_instance.domElement) {
        /* Disable picker cursor dragging */
        this.picker_instance.domElement.style.pointerEvents = 'none';
        /* Disable picker buttons */

        var buttons = this.picker_instance.domElement.querySelectorAll('button');

        for (var i = 0; i < buttons.length; i++) {
          buttons[i].disabled = true;
        }
      }
    }
  }, {
    key: "enable",
    value: function enable() {
      _get(_getPrototypeOf(ColorEditor.prototype), "enable", this).call(this);

      if (this.picker_instance && this.picker_instance.domElement) {
        /* Enable picker cursor dragging */
        this.picker_instance.domElement.style.pointerEvents = 'auto';
        /* Enable picker buttons */

        var buttons = this.picker_instance.domElement.querySelectorAll('button');

        for (var i = 0; i < buttons.length; i++) {
          buttons[i].disabled = false;
        }
      }
    }
  }, {
    key: "destroy",
    value: function destroy() {
      this.createPicker(false);

      _get(_getPrototypeOf(ColorEditor.prototype), "destroy", this).call(this);
    }
    /* helper functions */

  }, {
    key: "createPicker",
    value: function createPicker(create) {
      var _this = this;

      if (create) {
        /* create vanilla-picker */
        if (window.Picker && !this.picker_instance) {
          /* do when vanilla-picker loaded */
          var options = this.expandCallbacks('colorpicker', Object(_utilities_js__WEBPACK_IMPORTED_MODULE_16__["extend"])({}, {
            editor: false,

            /* default no editor */
            alpha: false,

            /* default no alpha */
            color: this.value,
            popup: 'bottom'
            /* show in the bottom */

          }, this.defaults.options.colorpicker || {}, this.options.colorpicker || {}, {
            parent: this.container
          }));

          var updateHandler = function updateHandler(color) {
            var format = _this.picker_instance.settings.editorFormat;
            var isAlpha = _this.picker_instance.settings.alpha;

            _this.setValue(format === 'hex' ? isAlpha ? color.hex : color.hex.slice(0, 7) : color["".concat(format + (isAlpha ? 'a' : ''), "String")]);
          };

          if (!options.popup && typeof options.onChange !== 'function') options.onChange = updateHandler;else if (options.popup && typeof options.onDone !== 'function') options.onDone = updateHandler;
          this.picker_instance = new window.Picker(options);
          /* this.picker_instance.openHandler() */

          if (!options.popup) {
            /* use inline colorPicker */
            this.input.style.display = 'none';
            this.theme.afterInputReady(this.picker_instance.domElement);
          }
        }
      } else {
        /* destroy vanilla-picker */
        if (this.picker_instance) {
          this.picker_instance.destroy();
          this.picker_instance = null;
          this.input.style.display = '';
        }
      }
    }
  }]);

  return ColorEditor;
}(_string_js__WEBPACK_IMPORTED_MODULE_15__["StringEditor"]);

/***/ }),

/***/ "./src/editors/datetime.js":
/*!*********************************!*\
  !*** ./src/editors/datetime.js ***!
  \*********************************/
/*! exports provided: DatetimeEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DatetimeEditor", function() { return DatetimeEditor; });
/* harmony import */ var core_js_modules_es_parse_int_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.parse-int.js */ "./node_modules/core-js/modules/es.parse-int.js");
/* harmony import */ var core_js_modules_es_parse_int_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_parse_int_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.date.to-string.js */ "./node_modules/core-js/modules/es.date.to-string.js");
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.join.js */ "./node_modules/core-js/modules/es.array.join.js");
/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./string.js */ "./src/editors/string.js");




















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

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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

/*

Edtended handling of date, time and datetime-local type fields.

Works with both string and integer data types. (default only support string type)

Has optional support for using flatpickr datepicker.
All flatpickr options is supported with a few minor differences.
- "enableTime" and "noCalendar" are set automatically, based on the data type.
- Extra config option "errorDateFormat". If this is set, it will replace the format displayed in error messages.
- It is not possible to use "inline" and "wrap" options together.
- When using the "wrap" option, "toggle" and "clear" buttons are automatically added to markup. 2 extra boolean options ("showToggleButton" and "showClearButton") are available to control which buttons to display. Note: not all frameworks supports this. (Works in: Bootstrap and Foundation)
- When using the "inline" option, an extra boolean option ("inlineHideInput") is available to hide the original input field.
- If "mode" is set to either "multiple" or "range", only string data type is supported. Also the result from these is returned as a string not an array.

ToDo:
 - Improve Handling of flatpicker "multiple" and "range" modes. (Currently the values are just added as string values, but the optimal scenario would be to save those as array if possible)

*/

var DatetimeEditor = /*#__PURE__*/function (_StringEditor) {
  _inherits(DatetimeEditor, _StringEditor);

  var _super = _createSuper(DatetimeEditor);

  function DatetimeEditor() {
    _classCallCheck(this, DatetimeEditor);

    return _super.apply(this, arguments);
  }

  _createClass(DatetimeEditor, [{
    key: "build",
    value: function build() {
      _get(_getPrototypeOf(DatetimeEditor.prototype), "build", this).call(this);

      if (!this.input) {
        return;
      }

      if (this.schema.max && typeof this.schema.max === 'string') {
        this.input.setAttribute('max', this.schema.max);
      }

      if (this.schema.min && typeof this.schema.max === 'string') {
        this.input.setAttribute('min', this.schema.min);
      }

      if (window.flatpickr && _typeof(this.options.flatpickr) === 'object') {
        /* Make sure that flatpickr settings matches the input type */
        this.options.flatpickr.enableTime = this.schema.format !== 'date';
        this.options.flatpickr.noCalendar = this.schema.format === 'time';
        /* Curently only string can contain range or multiple values */

        if (this.schema.type === 'integer') this.options.flatpickr.mode = 'single';
        /* Attribute for flatpicker */

        this.input.setAttribute('data-input', '');
        var input = this.input;

        if (this.options.flatpickr.wrap === true) {
          /* Create buttons for input group */
          var buttons = [];

          if (this.options.flatpickr.showToggleButton !== false) {
            var toggleButton = this.getButton('', this.schema.format === 'time' ? 'time' : 'calendar', 'flatpickr_toggle_button');
            /* Attribute for flatpicker */

            toggleButton.setAttribute('data-toggle', '');
            buttons.push(toggleButton);
          }

          if (this.options.flatpickr.showClearButton !== false) {
            var clearButton = this.getButton('', 'clear', 'flatpickr_clear_button');
            /* Attribute for flatpicker */

            clearButton.setAttribute('data-clear', '');
            buttons.push(clearButton);
          }
          /* Save position of input field */


          var parentNode = this.input.parentNode;
          var nextSibling = this.input.nextSibling;
          var buttonContainer = this.theme.getInputGroup(this.input, buttons);

          if (buttonContainer !== undefined) {
            /* Make sure "inline" option is turned off */
            this.options.flatpickr.inline = false;
            /* Insert container at same position as input field */

            parentNode.insertBefore(buttonContainer, nextSibling);
            input = buttonContainer;
          } else {
            this.options.flatpickr.wrap = false;
          }
        }

        this.flatpickr = window.flatpickr(input, this.options.flatpickr);

        if (this.options.flatpickr.inline === true && this.options.flatpickr.inlineHideInput === true) {
          this.input.setAttribute('type', 'hidden');
        }
      }
    }
  }, {
    key: "getValue",
    value: function getValue() {
      if (!this.dependenciesFulfilled) {
        return undefined;
      }

      if (this.schema.type === 'string') {
        return this.value;
      }

      if (this.value === '' || this.value === undefined) {
        return undefined;
      }

      var value = this.schema.format === 'time' ? "1970-01-01 ".concat(this.value) : this.value;
      return parseInt(new Date(value).getTime() / 1000);
    }
  }, {
    key: "setValue",
    value: function setValue(value, initial, fromTemplate) {
      if (this.schema.type === 'string') {
        _get(_getPrototypeOf(DatetimeEditor.prototype), "setValue", this).call(this, value, initial, fromTemplate);

        if (this.flatpickr) this.flatpickr.setDate(value);
      } else if (value > 0) {
        var dateObj = new Date(value * 1000);
        var year = dateObj.getFullYear();
        var month = this.zeroPad(dateObj.getMonth() + 1);
        var day = this.zeroPad(dateObj.getDate());
        var hour = this.zeroPad(dateObj.getHours());
        var min = this.zeroPad(dateObj.getMinutes());
        var sec = this.zeroPad(dateObj.getSeconds());
        var date = [year, month, day].join('-');
        var time = [hour, min, sec].join(':');
        var dateValue = "".concat(date, "T").concat(time);
        if (this.schema.format === 'date') dateValue = date;else if (this.schema.format === 'time') dateValue = time;
        this.input.value = dateValue;
        this.refreshValue();
        if (this.flatpickr) this.flatpickr.setDate(dateValue);
      }
    }
  }, {
    key: "destroy",
    value: function destroy() {
      if (this.flatpickr) this.flatpickr.destroy();
      this.flatpickr = null;

      _get(_getPrototypeOf(DatetimeEditor.prototype), "destroy", this).call(this);
    }
    /* helper function */

  }, {
    key: "zeroPad",
    value: function zeroPad(value) {
      return "0".concat(value).slice(-2);
    }
  }]);

  return DatetimeEditor;
}(_string_js__WEBPACK_IMPORTED_MODULE_19__["StringEditor"]);

/***/ }),

/***/ "./src/editors/describedby.js":
/*!************************************!*\
  !*** ./src/editors/describedby.js ***!
  \************************************/
/*! exports provided: DescribedByEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DescribedByEditor", function() { return DescribedByEditor; });
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var _editor_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../editor.js */ "./src/editor.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }




















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

/* hyper-link describeBy Editor */


var DescribedByEditor = /*#__PURE__*/function (_AbstractEditor) {
  _inherits(DescribedByEditor, _AbstractEditor);

  var _super = _createSuper(DescribedByEditor);

  function DescribedByEditor() {
    _classCallCheck(this, DescribedByEditor);

    return _super.apply(this, arguments);
  }

  _createClass(DescribedByEditor, [{
    key: "register",
    value: function register() {
      if (this.editors) {
        for (var i = 0; i < this.editors.length; i++) {
          if (!this.editors[i]) continue;
          this.editors[i].unregister();
        }

        if (this.editors[this.currentEditor]) this.editors[this.currentEditor].register();
      }

      _get(_getPrototypeOf(DescribedByEditor.prototype), "register", this).call(this);
    }
  }, {
    key: "unregister",
    value: function unregister() {
      _get(_getPrototypeOf(DescribedByEditor.prototype), "unregister", this).call(this);

      if (this.editors) {
        for (var i = 0; i < this.editors.length; i++) {
          if (!this.editors[i]) continue;
          this.editors[i].unregister();
        }
      }
    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      if (!this.editors[this.currentEditor]) return 4;
      return Math.max(this.editors[this.currentEditor].getNumColumns(), 4);
    }
  }, {
    key: "enable",
    value: function enable() {
      if (this.editors) {
        for (var i = 0; i < this.editors.length; i++) {
          if (!this.editors[i]) continue;
          this.editors[i].enable();
        }
      }

      _get(_getPrototypeOf(DescribedByEditor.prototype), "enable", this).call(this);
    }
  }, {
    key: "disable",
    value: function disable() {
      if (this.editors) {
        for (var i = 0; i < this.editors.length; i++) {
          if (!this.editors[i]) continue;
          this.editors[i].disable();
        }
      }

      _get(_getPrototypeOf(DescribedByEditor.prototype), "disable", this).call(this);
    }
  }, {
    key: "switchEditor",
    value: function switchEditor() {
      var _this = this;

      var vars = this.getWatchedFieldValues();
      if (!vars) return;
      /* var ref = this.template.fillFromObject(vars); */

      /* var ref = this.template(vars); */

      var ref = document.location.origin + document.location.pathname + this.template(vars);

      if (!this.editors[this.refs[ref]]) {
        this.buildChildEditor(ref);
      }

      this.currentEditor = this.refs[ref];
      this.register();
      this.editors.forEach(function (editor, ref) {
        if (!editor) return;

        if (_this.currentEditor === ref) {
          editor.container.style.display = '';
        } else {
          editor.container.style.display = 'none';
        }
      });
      this.refreshValue();
      this.onChange(true);
    }
  }, {
    key: "buildChildEditor",
    value: function buildChildEditor(ref) {
      this.refs[ref] = this.editors.length;
      var holder = this.theme.getChildEditorHolder();
      this.editor_holder.appendChild(holder);
      var schema = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_19__["extend"])({}, this.schema, this.jsoneditor.refs[ref]);
      var editorClass = this.jsoneditor.getEditorClass(schema, this.jsoneditor);
      var editor = this.jsoneditor.createEditor(editorClass, {
        jsoneditor: this.jsoneditor,
        schema: schema,
        container: holder,
        path: this.path,
        parent: this,
        required: true
      });
      this.editors.push(editor);
      editor.preBuild();
      editor.build();
      editor.postBuild();
    }
  }, {
    key: "preBuild",
    value: function preBuild() {
      this.refs = {};
      this.editors = [];
      this.currentEditor = '';
      var i;

      for (i = 0; i < this.schema.links.length; i++) {
        if (this.schema.links[i].rel.toLowerCase() === 'describedby') {
          /* this.template = new UriTemplate(this.schema.links[i].href); */
          this.template = this.jsoneditor.compileTemplate(this.schema.links[i].href, this.template_engine);
          break;
        }
      }
      /* this.template.fill(function(varName) {
        this.schema.watch = this.schema.watch || {};
        this.schema.watch[varName] = varName;
        return '';
      }); */


      this.schema.links = this.schema.links.slice(0, i).concat(this.schema.links.slice(i + 1));
      if (this.schema.links.length === 0) delete this.schema.links;
      this.baseSchema = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_19__["extend"])({}, this.schema);
    }
  }, {
    key: "build",
    value: function build() {
      this.editor_holder = document.createElement('div');
      this.container.appendChild(this.editor_holder);
      this.switchEditor();
    }
  }, {
    key: "onWatchedFieldChange",
    value: function onWatchedFieldChange() {
      this.switchEditor();
    }
  }, {
    key: "onChildEditorChange",
    value: function onChildEditorChange(editor) {
      if (this.editors[this.currentEditor]) {
        this.refreshValue();
      }

      _get(_getPrototypeOf(DescribedByEditor.prototype), "onChildEditorChange", this).call(this, editor);
    }
  }, {
    key: "refreshValue",
    value: function refreshValue() {
      if (this.editors[this.currentEditor]) {
        this.value = this.editors[this.currentEditor].getValue();
      }
    }
  }, {
    key: "setValue",
    value: function setValue(val, initial) {
      if (this.editors[this.currentEditor]) {
        this.editors[this.currentEditor].setValue(val, initial);
        this.refreshValue();
        this.onChange();
      }
    }
  }, {
    key: "destroy",
    value: function destroy() {
      this.editors.forEach(function (editor) {
        if (editor) editor.destroy();
      });

      if (this.editor_holder && this.editor_holder.parentNode) {
        this.editor_holder.parentNode.removeChild(this.editor_holder);
      }

      _get(_getPrototypeOf(DescribedByEditor.prototype), "destroy", this).call(this);
    }
  }, {
    key: "showValidationErrors",
    value: function showValidationErrors(errors) {
      this.editors.forEach(function (editor) {
        if (!editor) return;
        editor.showValidationErrors(errors);
      });
    }
  }]);

  return DescribedByEditor;
}(_editor_js__WEBPACK_IMPORTED_MODULE_18__["AbstractEditor"]);

/***/ }),

/***/ "./src/editors/enum.js":
/*!*****************************!*\
  !*** ./src/editors/enum.js ***!
  \*****************************/
/*! exports provided: EnumEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EnumEditor", function() { return EnumEditor; });
/* harmony import */ var core_js_modules_es_array_index_of_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.index-of.js */ "./node_modules/core-js/modules/es.array.index-of.js");
/* harmony import */ var core_js_modules_es_array_index_of_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_index_of_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ "./node_modules/core-js/modules/es.array.is-array.js");
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js");
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.entries.js */ "./node_modules/core-js/modules/es.object.entries.js");
/* harmony import */ var core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.string.replace.js */ "./node_modules/core-js/modules/es.string.replace.js");
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_19__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_20__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_21__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_22__);
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_23__);
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_24__);
/* harmony import */ var _editor_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../editor.js */ "./src/editor.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }



























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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

/* Enum Editor (used for objects and arrays with enumerated values) */

var EnumEditor = /*#__PURE__*/function (_AbstractEditor) {
  _inherits(EnumEditor, _AbstractEditor);

  var _super = _createSuper(EnumEditor);

  function EnumEditor() {
    _classCallCheck(this, EnumEditor);

    return _super.apply(this, arguments);
  }

  _createClass(EnumEditor, [{
    key: "getNumColumns",
    value: function getNumColumns() {
      return 4;
    }
  }, {
    key: "build",
    value: function build() {
      var _this = this;

      this.title = this.header = this.label = this.theme.getFormInputLabel(this.getTitle(), this.isRequired());
      this.container.appendChild(this.title);
      this.options.enum_titles = this.options.enum_titles || [];
      this["enum"] = this.schema["enum"];
      this.selected = 0;
      this.select_options = [];
      this.html_values = [];

      for (var i = 0; i < this["enum"].length; i++) {
        this.select_options[i] = this.options.enum_titles[i] || "Value ".concat(i + 1);
        this.html_values[i] = this.getHTML(this["enum"][i]);
      }
      /* Switcher */


      this.switcher = this.theme.getSwitcher(this.select_options);
      this.container.appendChild(this.switcher);
      /* Display area */

      this.display_area = this.theme.getIndentedPanel();
      this.container.appendChild(this.display_area);
      if (this.options.hide_display) this.display_area.style.display = 'none';
      this.switcher.addEventListener('change', function (e) {
        _this.selected = _this.select_options.indexOf(e.currentTarget.value);
        _this.value = _this["enum"][_this.selected];

        _this.refreshValue();

        _this.onChange(true);
      });
      this.value = this["enum"][0];
      this.refreshValue();
      if (this["enum"].length === 1) this.switcher.style.display = 'none';
    }
  }, {
    key: "refreshValue",
    value: function refreshValue() {
      var _this2 = this;

      this.selected = -1;
      var stringified = JSON.stringify(this.value);
      this["enum"].forEach(function (el, i) {
        if (stringified === JSON.stringify(el)) {
          _this2.selected = i;
          return false;
        }
      });

      if (this.selected < 0) {
        this.setValue(this["enum"][0]);
        return;
      }

      this.switcher.value = this.select_options[this.selected];
      this.display_area.innerHTML = this.html_values[this.selected];
    }
  }, {
    key: "enable",
    value: function enable() {
      if (!this.always_disabled) {
        this.switcher.disabled = false;

        _get(_getPrototypeOf(EnumEditor.prototype), "enable", this).call(this);
      }
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      if (alwaysDisabled) this.always_disabled = true;
      this.switcher.disabled = true;

      _get(_getPrototypeOf(EnumEditor.prototype), "disable", this).call(this);
    }
  }, {
    key: "getHTML",
    value: function getHTML(el) {
      var _this3 = this;

      var each = function each(obj, callback) {
        if (Array.isArray(obj) || typeof obj.length === 'number' && obj.length > 0 && obj.length - 1 in obj) {
          Array.from(obj).forEach(function (e, i) {
            return callback(i, e);
          });
        } else {
          Object.entries(obj).forEach(function (_ref) {
            var _ref2 = _slicedToArray(_ref, 2),
                key = _ref2[0],
                value = _ref2[1];

            return callback(key, value);
          });
        }
      };

      if (el === null) {
        return '<em>null</em>';
        /* Array or Object */
      } else if (_typeof(el) === 'object') {
        /* TODO: use theme */
        var ret = '';

        var callback = function callback(i, child) {
          var html = _this3.getHTML(child);
          /* Add the keys to object children */


          if (!Array.isArray(el)) {
            /* TODO: use theme */
            html = "<div><em>".concat(i, "</em>: ").concat(html, "</div>");
          }
          /* TODO: use theme */


          ret += "<li>".concat(html, "</li>");
        };

        each(el, callback);
        if (Array.isArray(el)) ret = "<ol>".concat(ret, "</ol>");else ret = "<ul style='margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;'>".concat(ret, "</ul>");
        return ret;
        /* Boolean */
      } else if (typeof el === 'boolean') {
        return el ? 'true' : 'false';
        /* String */
      } else if (typeof el === 'string') {
        return el.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
        /* Number */
      }

      return el;
    }
  }, {
    key: "setValue",
    value: function setValue(val) {
      if (this.value !== val) {
        this.value = val;
        this.refreshValue();
        this.onChange();
      }
    }
  }, {
    key: "destroy",
    value: function destroy() {
      if (this.display_area && this.display_area.parentNode) this.display_area.parentNode.removeChild(this.display_area);
      if (this.title && this.title.parentNode) this.title.parentNode.removeChild(this.title);
      if (this.switcher && this.switcher.parentNode) this.switcher.parentNode.removeChild(this.switcher);

      _get(_getPrototypeOf(EnumEditor.prototype), "destroy", this).call(this);
    }
  }]);

  return EnumEditor;
}(_editor_js__WEBPACK_IMPORTED_MODULE_25__["AbstractEditor"]);

/***/ }),

/***/ "./src/editors/hidden.js":
/*!*******************************!*\
  !*** ./src/editors/hidden.js ***!
  \*******************************/
/*! exports provided: HiddenEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HiddenEditor", function() { return HiddenEditor; });
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var _editor_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../editor.js */ "./src/editor.js");















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

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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

/**
 * Created by Mehmet Baker on 12.04.2017
 */

var HiddenEditor = /*#__PURE__*/function (_AbstractEditor) {
  _inherits(HiddenEditor, _AbstractEditor);

  var _super = _createSuper(HiddenEditor);

  function HiddenEditor() {
    _classCallCheck(this, HiddenEditor);

    return _super.apply(this, arguments);
  }

  _createClass(HiddenEditor, [{
    key: "register",
    value: function register() {
      _get(_getPrototypeOf(HiddenEditor.prototype), "register", this).call(this);

      if (!this.input) return;
      this.input.setAttribute('name', this.formname);
    }
  }, {
    key: "unregister",
    value: function unregister() {
      _get(_getPrototypeOf(HiddenEditor.prototype), "unregister", this).call(this);

      if (!this.input) return;
      this.input.removeAttribute('name');
    }
  }, {
    key: "setValue",
    value: function setValue(value, initial, fromTemplate) {
      if (this.template && !fromTemplate) {
        return;
      }

      if (value === null || typeof value === 'undefined') value = '';else if (_typeof(value) === 'object') value = JSON.stringify(value);else if (typeof value !== 'string') value = "".concat(value);
      if (value === this.serialized) return;
      /* Sanitize value before setting it */

      var sanitized = this.sanitize(value);

      if (this.input.value === sanitized) {
        return;
      }

      this.input.value = sanitized;
      var changed = fromTemplate || this.getValue() !== value;
      this.refreshValue();
      if (initial) this.is_dirty = false;else if (this.jsoneditor.options.show_errors === 'change') this.is_dirty = true;
      if (this.adjust_height) this.adjust_height(this.input);
      /* Bubble this setValue to parents if the value changed */

      this.onChange(changed);
    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      return 2;
    }
  }, {
    key: "enable",
    value: function enable() {
      _get(_getPrototypeOf(HiddenEditor.prototype), "enable", this).call(this);
    }
  }, {
    key: "disable",
    value: function disable() {
      _get(_getPrototypeOf(HiddenEditor.prototype), "disable", this).call(this);
    }
  }, {
    key: "refreshValue",
    value: function refreshValue() {
      this.value = this.input.value;
      if (typeof this.value !== 'string') this.value = '';
      this.serialized = this.value;
    }
  }, {
    key: "destroy",
    value: function destroy() {
      this.template = null;
      if (this.input && this.input.parentNode) this.input.parentNode.removeChild(this.input);
      if (this.label && this.label.parentNode) this.label.parentNode.removeChild(this.label);
      if (this.description && this.description.parentNode) this.description.parentNode.removeChild(this.description);

      _get(_getPrototypeOf(HiddenEditor.prototype), "destroy", this).call(this);
    }
    /**
     * This is overridden in derivative editors
     */

  }, {
    key: "sanitize",
    value: function sanitize(value) {
      return value;
    }
    /**
     * Re-calculates the value if needed
     */

  }, {
    key: "onWatchedFieldChange",
    value: function onWatchedFieldChange() {
      var vars;
      /* If this editor needs to be rendered by a macro template */

      if (this.template) {
        vars = this.getWatchedFieldValues();
        this.setValue(this.template(vars), false, true);
      }

      _get(_getPrototypeOf(HiddenEditor.prototype), "onWatchedFieldChange", this).call(this);
    }
  }, {
    key: "build",
    value: function build() {
      this.format = this.schema.format;

      if (!this.format && this.options.default_format) {
        this.format = this.options.default_format;
      }

      if (this.options.format) {
        this.format = this.options.format;
      }

      this.input_type = 'hidden';
      this.input = this.theme.getFormInputField(this.input_type);
      if (this.format) this.input.setAttribute('data-schemaformat', this.format);
      this.container.appendChild(this.input);
      /* Compile and store the template */

      if (this.schema.template) {
        var callback = this.expandCallbacks('template', {
          template: this.schema.template
        });
        if (typeof callback.template === 'function') this.template = callback.template;else this.template = this.jsoneditor.compileTemplate(this.schema.template, this.template_engine);
        this.refreshValue();
      } else {
        this.refreshValue();
      }
    }
  }]);

  return HiddenEditor;
}(_editor_js__WEBPACK_IMPORTED_MODULE_14__["AbstractEditor"]);

/***/ }),

/***/ "./src/editors/index.js":
/*!******************************!*\
  !*** ./src/editors/index.js ***!
  \******************************/
/*! exports provided: editors */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "editors", function() { return editors; });
/* harmony import */ var _ace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ace.js */ "./src/editors/ace.js");
/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ "./src/editors/array.js");
/* harmony import */ var _array_choices_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./array/choices.js */ "./src/editors/array/choices.js");
/* harmony import */ var _array_select2_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./array/select2.js */ "./src/editors/array/select2.js");
/* harmony import */ var _array_selectize_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./array/selectize.js */ "./src/editors/array/selectize.js");
/* harmony import */ var _autocomplete_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./autocomplete.js */ "./src/editors/autocomplete.js");
/* harmony import */ var _base64_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./base64.js */ "./src/editors/base64.js");
/* harmony import */ var _button_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./button.js */ "./src/editors/button.js");
/* harmony import */ var _checkbox_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./checkbox.js */ "./src/editors/checkbox.js");
/* harmony import */ var _choices_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./choices.js */ "./src/editors/choices.js");
/* harmony import */ var _datetime_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./datetime.js */ "./src/editors/datetime.js");
/* harmony import */ var _describedby_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./describedby.js */ "./src/editors/describedby.js");
/* harmony import */ var _enum_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./enum.js */ "./src/editors/enum.js");
/* harmony import */ var _hidden_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./hidden.js */ "./src/editors/hidden.js");
/* harmony import */ var _info_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./info.js */ "./src/editors/info.js");
/* harmony import */ var _integer_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./integer.js */ "./src/editors/integer.js");
/* harmony import */ var _ip_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./ip.js */ "./src/editors/ip.js");
/* harmony import */ var _jodit_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./jodit.js */ "./src/editors/jodit.js");
/* harmony import */ var _multiple_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./multiple.js */ "./src/editors/multiple.js");
/* harmony import */ var _multiselect_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./multiselect.js */ "./src/editors/multiselect.js");
/* harmony import */ var _null_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./null.js */ "./src/editors/null.js");
/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./number.js */ "./src/editors/number.js");
/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./object.js */ "./src/editors/object.js");
/* harmony import */ var _radio_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./radio.js */ "./src/editors/radio.js");
/* harmony import */ var _sceditor_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./sceditor.js */ "./src/editors/sceditor.js");
/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./select.js */ "./src/editors/select.js");
/* harmony import */ var _select2_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./select2.js */ "./src/editors/select2.js");
/* harmony import */ var _selectize_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./selectize.js */ "./src/editors/selectize.js");
/* harmony import */ var _signature_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./signature.js */ "./src/editors/signature.js");
/* harmony import */ var _simplemde_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./simplemde.js */ "./src/editors/simplemde.js");
/* harmony import */ var _starrating_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./starrating.js */ "./src/editors/starrating.js");
/* harmony import */ var _stepper_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./stepper.js */ "./src/editors/stepper.js");
/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./string.js */ "./src/editors/string.js");
/* harmony import */ var _table_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./table.js */ "./src/editors/table.js");
/* harmony import */ var _upload_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./upload.js */ "./src/editors/upload.js");
/* harmony import */ var _uuid_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./uuid.js */ "./src/editors/uuid.js");
/* harmony import */ var _colorpicker_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./colorpicker.js */ "./src/editors/colorpicker.js");
/* Internal helper function called only here so we won't export as part of class */

/* Previously the assignment to the JSONEditor.defaults.editors was done in each of the editor */

/* files but doing it this way removes each of the editors' dependency on JSONEditor */





































var editors = {
  ace: _ace_js__WEBPACK_IMPORTED_MODULE_0__["AceEditor"],
  array: _array_js__WEBPACK_IMPORTED_MODULE_1__["ArrayEditor"],
  arrayChoices: _array_choices_js__WEBPACK_IMPORTED_MODULE_2__["ArrayChoicesEditor"],
  arraySelect2: _array_select2_js__WEBPACK_IMPORTED_MODULE_3__["ArraySelect2Editor"],
  arraySelectize: _array_selectize_js__WEBPACK_IMPORTED_MODULE_4__["ArraySelectizeEditor"],
  autocomplete: _autocomplete_js__WEBPACK_IMPORTED_MODULE_5__["AutocompleteEditor"],
  base64: _base64_js__WEBPACK_IMPORTED_MODULE_6__["Base64Editor"],
  button: _button_js__WEBPACK_IMPORTED_MODULE_7__["ButtonEditor"],
  checkbox: _checkbox_js__WEBPACK_IMPORTED_MODULE_8__["CheckboxEditor"],
  choices: _choices_js__WEBPACK_IMPORTED_MODULE_9__["ChoicesEditor"],
  datetime: _datetime_js__WEBPACK_IMPORTED_MODULE_10__["DatetimeEditor"],
  describedBy: _describedby_js__WEBPACK_IMPORTED_MODULE_11__["DescribedByEditor"],
  "enum": _enum_js__WEBPACK_IMPORTED_MODULE_12__["EnumEditor"],
  hidden: _hidden_js__WEBPACK_IMPORTED_MODULE_13__["HiddenEditor"],
  info: _info_js__WEBPACK_IMPORTED_MODULE_14__["InfoEditor"],
  integer: _integer_js__WEBPACK_IMPORTED_MODULE_15__["IntegerEditor"],
  ip: _ip_js__WEBPACK_IMPORTED_MODULE_16__["IpEditor"],
  jodit: _jodit_js__WEBPACK_IMPORTED_MODULE_17__["JoditEditor"],
  multiple: _multiple_js__WEBPACK_IMPORTED_MODULE_18__["MultipleEditor"],
  multiselect: _multiselect_js__WEBPACK_IMPORTED_MODULE_19__["MultiSelectEditor"],
  "null": _null_js__WEBPACK_IMPORTED_MODULE_20__["NullEditor"],
  number: _number_js__WEBPACK_IMPORTED_MODULE_21__["NumberEditor"],
  object: _object_js__WEBPACK_IMPORTED_MODULE_22__["ObjectEditor"],
  radio: _radio_js__WEBPACK_IMPORTED_MODULE_23__["RadioEditor"],
  sceditor: _sceditor_js__WEBPACK_IMPORTED_MODULE_24__["ScEditor"],
  select: _select_js__WEBPACK_IMPORTED_MODULE_25__["SelectEditor"],
  select2: _select2_js__WEBPACK_IMPORTED_MODULE_26__["Select2Editor"],
  selectize: _selectize_js__WEBPACK_IMPORTED_MODULE_27__["SelectizeEditor"],
  signature: _signature_js__WEBPACK_IMPORTED_MODULE_28__["SignatureEditor"],
  simplemde: _simplemde_js__WEBPACK_IMPORTED_MODULE_29__["SimplemdeEditor"],
  starrating: _starrating_js__WEBPACK_IMPORTED_MODULE_30__["StarratingEditor"],
  stepper: _stepper_js__WEBPACK_IMPORTED_MODULE_31__["StepperEditor"],
  string: _string_js__WEBPACK_IMPORTED_MODULE_32__["StringEditor"],
  table: _table_js__WEBPACK_IMPORTED_MODULE_33__["TableEditor"],
  upload: _upload_js__WEBPACK_IMPORTED_MODULE_34__["UploadEditor"],
  uuid: _uuid_js__WEBPACK_IMPORTED_MODULE_35__["UuidEditor"],
  colorpicker: _colorpicker_js__WEBPACK_IMPORTED_MODULE_36__["ColorEditor"]
};

/***/ }),

/***/ "./src/editors/info.js":
/*!*****************************!*\
  !*** ./src/editors/info.js ***!
  \*****************************/
/*! exports provided: InfoEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InfoEditor", function() { return InfoEditor; });
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var _button_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./button.js */ "./src/editors/button.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }














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); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

/* Non-Active editor for displaying text blocks in form */

var InfoEditor = /*#__PURE__*/function (_ButtonEditor) {
  _inherits(InfoEditor, _ButtonEditor);

  var _super = _createSuper(InfoEditor);

  function InfoEditor() {
    _classCallCheck(this, InfoEditor);

    return _super.apply(this, arguments);
  }

  _createClass(InfoEditor, [{
    key: "build",
    value: function build() {
      this.options.compact = false;
      this.header = this.label = this.theme.getFormInputLabel(this.getTitle());
      this.description = this.theme.getDescription(this.schema.description || '');
      this.control = this.theme.getFormControl(this.label, this.description, null);
      this.container.appendChild(this.control);
    }
  }, {
    key: "getTitle",
    value: function getTitle() {
      return this.translateProperty(this.schema.title);
    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      return 12;
    }
  }]);

  return InfoEditor;
}(_button_js__WEBPACK_IMPORTED_MODULE_12__["ButtonEditor"]);

/***/ }),

/***/ "./src/editors/integer.js":
/*!********************************!*\
  !*** ./src/editors/integer.js ***!
  \********************************/
/*! exports provided: IntegerEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IntegerEditor", function() { return IntegerEditor; });
/* harmony import */ var core_js_modules_es_parse_int_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.parse-int.js */ "./node_modules/core-js/modules/es.parse-int.js");
/* harmony import */ var core_js_modules_es_parse_int_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_parse_int_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./number.js */ "./src/editors/number.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }















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); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var IntegerEditor = /*#__PURE__*/function (_NumberEditor) {
  _inherits(IntegerEditor, _NumberEditor);

  var _super = _createSuper(IntegerEditor);

  function IntegerEditor() {
    _classCallCheck(this, IntegerEditor);

    return _super.apply(this, arguments);
  }

  _createClass(IntegerEditor, [{
    key: "getNumColumns",
    value: function getNumColumns() {
      return 2;
    }
  }, {
    key: "getValue",
    value: function getValue() {
      if (!this.dependenciesFulfilled) {
        return undefined;
      }

      var value = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_14__["isInteger"])(this.value) ? parseInt(this.value) : this.value;

      if (!this.jsoneditor.options.use_default_values && value === '') {
        return undefined;
      }

      return value;
    }
  }]);

  return IntegerEditor;
}(_number_js__WEBPACK_IMPORTED_MODULE_13__["NumberEditor"]);

/***/ }),

/***/ "./src/editors/ip.js":
/*!***************************!*\
  !*** ./src/editors/ip.js ***!
  \***************************/
/*! exports provided: IpEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IpEditor", function() { return IpEditor; });
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./string.js */ "./src/editors/string.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var IpEditor = /*#__PURE__*/function (_StringEditor) {
  _inherits(IpEditor, _StringEditor);

  var _super = _createSuper(IpEditor);

  function IpEditor() {
    _classCallCheck(this, IpEditor);

    return _super.apply(this, arguments);
  }

  _createClass(IpEditor, [{
    key: "preBuild",
    value: function preBuild() {
      _get(_getPrototypeOf(IpEditor.prototype), "preBuild", this).call(this);
      /* Create schema options object if deesn't exist */


      if (!this.schema.options) {
        this.schema.options = {};
      }
      /* Create cleave options if they don't exist */


      if (!this.schema.options.cleave) {
        switch (this.format) {
          case 'ipv6':
            this.schema.options.cleave = {
              delimiters: [':'],
              blocks: [4, 4, 4, 4, 4, 4, 4, 4],
              uppercase: true
            };
            break;

          case 'ipv4':
            this.schema.options.cleave = {
              delimiters: ['.'],
              blocks: [3, 3, 3, 3],
              numericOnly: true
            };
            break;
        }
      }
      /* Update options object */


      this.options = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_15__["extend"])(this.options, this.schema.options || {});
    }
  }]);

  return IpEditor;
}(_string_js__WEBPACK_IMPORTED_MODULE_14__["StringEditor"]);

/***/ }),

/***/ "./src/editors/jodit.js":
/*!******************************!*\
  !*** ./src/editors/jodit.js ***!
  \******************************/
/*! exports provided: JoditEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JoditEditor", function() { return JoditEditor; });
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./string.js */ "./src/editors/string.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var JoditEditor = /*#__PURE__*/function (_StringEditor) {
  _inherits(JoditEditor, _StringEditor);

  var _super = _createSuper(JoditEditor);

  function JoditEditor() {
    _classCallCheck(this, JoditEditor);

    return _super.apply(this, arguments);
  }

  _createClass(JoditEditor, [{
    key: "setValue",
    value: function setValue(value, initial, fromTemplate) {
      var res = _get(_getPrototypeOf(JoditEditor.prototype), "setValue", this).call(this, value, initial, fromTemplate);

      if (res !== undefined && res.changed && this.jodit_instance) this.jodit_instance.setEditorValue(res.value);
    }
  }, {
    key: "build",
    value: function build() {
      this.options.format = 'textarea';
      /* Force format into "textarea" */

      _get(_getPrototypeOf(JoditEditor.prototype), "build", this).call(this);

      this.input_type = this.schema.format;
      /* Restore original format */

      this.input.setAttribute('data-schemaformat', this.input_type);
    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady() {
      var _this = this;

      var options;

      if (window.Jodit) {
        /* Get options, either global options from "this.defaults.options.jodit" or */

        /* single property options from schema "options.jodit" */
        options = this.expandCallbacks('jodit', Object(_utilities_js__WEBPACK_IMPORTED_MODULE_15__["extend"])({}, {
          height: 300
        }, this.defaults.options.jodit || {}, this.options.jodit || {}));
        this.jodit_instance = new window.Jodit(this.input, options);

        if (this.schema.readOnly || this.schema.readonly || this.schema.template) {
          this.jodit_instance.setReadOnly(true);
        }

        this.jodit_instance.events.on('change', function () {
          _this.value = _this.jodit_instance.getEditorValue();
          _this.is_dirty = true;

          _this.onChange(true);
        });
        this.theme.afterInputReady(this.input);
      } else _get(_getPrototypeOf(JoditEditor.prototype), "afterInputReady", this).call(this);
      /* Library not loaded, so just treat this as a string */

    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      return 6;
    }
  }, {
    key: "enable",
    value: function enable() {
      if (!this.always_disabled && this.jodit_instance) this.jodit_instance.setReadOnly(false);

      _get(_getPrototypeOf(JoditEditor.prototype), "enable", this).call(this);
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      if (this.jodit_instance) this.jodit_instance.setReadOnly(true);

      _get(_getPrototypeOf(JoditEditor.prototype), "disable", this).call(this, alwaysDisabled);
    }
  }, {
    key: "destroy",
    value: function destroy() {
      if (this.jodit_instance) {
        this.jodit_instance.destruct();
        this.jodit_instance = null;
      }

      _get(_getPrototypeOf(JoditEditor.prototype), "destroy", this).call(this);
    }
  }]);

  return JoditEditor;
}(_string_js__WEBPACK_IMPORTED_MODULE_14__["StringEditor"]);

/***/ }),

/***/ "./src/editors/multiple.js":
/*!*********************************!*\
  !*** ./src/editors/multiple.js ***!
  \*********************************/
/*! exports provided: MultipleEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultipleEditor", function() { return MultipleEditor; });
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ "./node_modules/core-js/modules/es.array.is-array.js");
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ "./node_modules/core-js/modules/es.string.includes.js");
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_array_index_of_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.index-of.js */ "./node_modules/core-js/modules/es.array.index-of.js");
/* harmony import */ var core_js_modules_es_array_index_of_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_index_of_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js");
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.string.match.js */ "./node_modules/core-js/modules/es.string.match.js");
/* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_string_starts_with_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.string.starts-with.js */ "./node_modules/core-js/modules/es.string.starts-with.js");
/* harmony import */ var core_js_modules_es_string_starts_with_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_starts_with_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.array.reduce.js */ "./node_modules/core-js/modules/es.array.reduce.js");
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_19__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_20__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_21__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_22__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_23__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_24__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_25__);
/* harmony import */ var _editor_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../editor.js */ "./src/editor.js");
/* harmony import */ var _validator_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../validator.js */ "./src/validator.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }




























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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

/* Multiple Editor (for when `type` is an array, also when `oneOf` is present) */



var MultipleEditor = /*#__PURE__*/function (_AbstractEditor) {
  _inherits(MultipleEditor, _AbstractEditor);

  var _super = _createSuper(MultipleEditor);

  function MultipleEditor() {
    _classCallCheck(this, MultipleEditor);

    return _super.apply(this, arguments);
  }

  _createClass(MultipleEditor, [{
    key: "register",
    value: function register() {
      if (this.editors) {
        for (var i = 0; i < this.editors.length; i++) {
          if (!this.editors[i]) continue;
          this.editors[i].unregister();
        }

        if (this.editors[this.type]) this.editors[this.type].register();
      }

      _get(_getPrototypeOf(MultipleEditor.prototype), "register", this).call(this);
    }
  }, {
    key: "unregister",
    value: function unregister() {
      _get(_getPrototypeOf(MultipleEditor.prototype), "unregister", this).call(this);

      if (this.editors) {
        for (var i = 0; i < this.editors.length; i++) {
          if (!this.editors[i]) continue;
          this.editors[i].unregister();
        }
      }
    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      if (!this.editors[this.type]) return 4;
      return Math.max(this.editors[this.type].getNumColumns(), 4);
    }
  }, {
    key: "enable",
    value: function enable() {
      if (!this.always_disabled) {
        if (this.editors) {
          for (var i = 0; i < this.editors.length; i++) {
            if (!this.editors[i]) continue;
            this.editors[i].enable();
          }
        }

        this.switcher.disabled = false;

        _get(_getPrototypeOf(MultipleEditor.prototype), "enable", this).call(this);
      }
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      if (alwaysDisabled) this.always_disabled = true;

      if (this.editors) {
        for (var i = 0; i < this.editors.length; i++) {
          if (!this.editors[i]) continue;
          this.editors[i].disable(alwaysDisabled);
        }
      }

      this.switcher.disabled = true;

      _get(_getPrototypeOf(MultipleEditor.prototype), "disable", this).call(this);
    }
  }, {
    key: "switchEditor",
    value: function switchEditor(i) {
      var _this = this;

      if (!this.editors[i]) {
        this.buildChildEditor(i);
      }

      var currentValue = this.getValue();
      this.type = i;
      this.register();
      this.editors.forEach(function (editor, type) {
        if (!editor) return;

        if (_this.type === type) {
          if (_this.keep_values) editor.setValue(currentValue, true);
          editor.container.style.display = '';
        } else editor.container.style.display = 'none';
      });
      this.refreshValue();
      this.refreshHeaderText();
    }
  }, {
    key: "buildChildEditor",
    value: function buildChildEditor(i) {
      var _this2 = this;

      var type = this.types[i];
      var holder = this.theme.getChildEditorHolder();
      this.editor_holder.appendChild(holder);
      var schema;

      if (typeof type === 'string') {
        schema = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_28__["extend"])({}, this.schema);
        schema.type = type;
      } else {
        schema = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_28__["extend"])({}, this.schema, type);
        schema = this.jsoneditor.expandRefs(schema);
        /* If we need to merge `required` arrays */

        if (type && type.required && Array.isArray(type.required) && this.schema.required && Array.isArray(this.schema.required)) {
          schema.required = this.schema.required.concat(type.required);
        }
      }

      var editor = this.jsoneditor.getEditorClass(schema);
      this.editors[i] = this.jsoneditor.createEditor(editor, {
        jsoneditor: this.jsoneditor,
        schema: schema,
        container: holder,
        path: this.path,
        parent: this,
        required: true
      });
      this.editors[i].preBuild();
      this.editors[i].build();
      this.editors[i].postBuild();
      if (this.editors[i].header) this.editors[i].header.style.display = 'none';
      this.editors[i].option = this.switcher_options[i];
      holder.addEventListener('change_header_text', function () {
        _this2.refreshHeaderText();
      });
      if (i !== this.type) holder.style.display = 'none';
    }
  }, {
    key: "preBuild",
    value: function preBuild() {
      this.types = [];
      this.type = 0;
      this.editors = [];
      this.validators = [];
      this.keep_values = true;
      if (typeof this.jsoneditor.options.keep_oneof_values !== 'undefined') this.keep_values = this.jsoneditor.options.keep_oneof_values;
      if (typeof this.options.keep_oneof_values !== 'undefined') this.keep_values = this.options.keep_oneof_values;

      if (this.schema.oneOf) {
        this.oneOf = true;
        this.types = this.schema.oneOf;
        delete this.schema.oneOf;
      } else if (this.schema.anyOf) {
        this.anyOf = true;
        this.types = this.schema.anyOf;
        delete this.schema.anyOf;
      } else {
        if (!this.schema.type || this.schema.type === 'any') {
          this.types = ['string', 'number', 'integer', 'boolean', 'object', 'array', 'null'];
          /* If any of these primitive types are disallowed */

          if (this.schema.disallow) {
            var disallow = this.schema.disallow;

            if (_typeof(disallow) !== 'object' || !Array.isArray(disallow)) {
              disallow = [disallow];
            }

            var allowedTypes = [];
            this.types.forEach(function (type) {
              if (!disallow.includes(type)) allowedTypes.push(type);
            });
            this.types = allowedTypes;
          }
        } else if (Array.isArray(this.schema.type)) {
          this.types = this.schema.type;
        } else {
          this.types = [this.schema.type];
        }

        delete this.schema.type;
      }

      this.display_text = this.getDisplayText(this.types);
    }
  }, {
    key: "build",
    value: function build() {
      var _this3 = this;

      var container = this.container;
      this.header = this.label = this.theme.getFormInputLabel(this.getTitle(), this.isRequired());
      this.container.appendChild(this.header);
      this.switcher = this.theme.getSwitcher(this.display_text);
      container.appendChild(this.switcher);
      this.switcher.addEventListener('change', function (e) {
        e.preventDefault();
        e.stopPropagation();

        _this3.switchEditor(_this3.display_text.indexOf(e.currentTarget.value));

        _this3.onChange(true);
      });
      this.editor_holder = document.createElement('div');
      container.appendChild(this.editor_holder);
      var validatorOptions = {};

      if (this.jsoneditor.options.custom_validators) {
        validatorOptions.custom_validators = this.jsoneditor.options.custom_validators;
      }

      this.switcher_options = this.theme.getSwitcherOptions(this.switcher);
      this.types.forEach(function (type, i) {
        _this3.editors[i] = false;
        var schema;

        if (typeof type === 'string') {
          schema = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_28__["extend"])({}, _this3.schema);
          schema.type = type;
        } else {
          schema = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_28__["extend"])({}, _this3.schema, type);
          /* If we need to merge `required` arrays */

          if (type.required && Array.isArray(type.required) && _this3.schema.required && Array.isArray(_this3.schema.required)) {
            schema.required = _this3.schema.required.concat(type.required);
          }
        }

        _this3.validators[i] = new _validator_js__WEBPACK_IMPORTED_MODULE_27__["Validator"](_this3.jsoneditor, schema, validatorOptions, _this3.defaults);
      });
      this.switchEditor(0);
    }
  }, {
    key: "onChildEditorChange",
    value: function onChildEditorChange(editor) {
      if (this.editors[this.type]) {
        this.refreshValue();
        this.refreshHeaderText();
      }

      _get(_getPrototypeOf(MultipleEditor.prototype), "onChildEditorChange", this).call(this);
    }
  }, {
    key: "refreshHeaderText",
    value: function refreshHeaderText() {
      var displayText = this.getDisplayText(this.types);
      Array.from(this.switcher_options).forEach(function (option, i) {
        option.textContent = displayText[i];
      });
    }
  }, {
    key: "refreshValue",
    value: function refreshValue() {
      this.value = this.editors[this.type].getValue();
    }
  }, {
    key: "setValue",
    value: function setValue(val, initial) {
      var _this4 = this;

      /* Determine type by getting the first one that validates */
      var prevType = this.type;
      /* find the best match one */

      var fitTestVal = {
        match: 0,
        extra: 0,
        i: this.type
      };
      var validVal = {
        match: 0,
        i: null
      };
      this.validators.forEach(function (validator, i) {
        var fitTestResult = null;

        if (typeof _this4.anyOf !== 'undefined' && _this4.anyOf) {
          fitTestResult = validator.fitTest(val);

          if (fitTestVal.match < fitTestResult.match) {
            fitTestVal = fitTestResult;
            fitTestVal.i = i;
          } else if (fitTestVal.match === fitTestResult.match) {
            if (fitTestVal.extra > fitTestResult.extra) {
              fitTestVal = fitTestResult;
              fitTestVal.i = i;
            }
          }
        }

        if (!validator.validate(val).length && validVal.i === null) {
          validVal.i = i;

          if (fitTestResult !== null) {
            validVal.match = fitTestResult.match;
          }
        } else {
          fitTestVal = validVal;
        }
      });
      var finalI = validVal.i;
      /* if the best fit schema has more match properties, then use the best fit schema. */

      /* usually the value could be */

      if (typeof this.anyOf !== 'undefined' && this.anyOf) {
        if (validVal.match < fitTestVal.match) {
          finalI = fitTestVal.i;
        }
      }

      if (finalI === null) {
        finalI = this.type;
      }

      this.type = finalI;
      this.switcher.value = this.display_text[finalI];
      var typeChanged = this.type !== prevType;

      if (typeChanged) {
        this.switchEditor(this.type);
      }

      this.editors[this.type].setValue(val, initial);
      this.refreshValue();
      this.onChange(typeChanged);
    }
  }, {
    key: "destroy",
    value: function destroy() {
      this.editors.forEach(function (editor) {
        if (editor) editor.destroy();
      });
      if (this.editor_holder && this.editor_holder.parentNode) this.editor_holder.parentNode.removeChild(this.editor_holder);
      if (this.switcher && this.switcher.parentNode) this.switcher.parentNode.removeChild(this.switcher);

      _get(_getPrototypeOf(MultipleEditor.prototype), "destroy", this).call(this);
    }
  }, {
    key: "showValidationErrors",
    value: function showValidationErrors(errors) {
      var _this5 = this;

      /* oneOf and anyOf error paths need to remove the oneOf[i] part before passing to child editors */
      if (this.oneOf || this.anyOf) {
        var checkPart = this.oneOf ? 'oneOf' : 'anyOf';
        this.editors.forEach(function (editor, i) {
          if (!editor) return;
          var check = "".concat(_this5.path, ".").concat(checkPart, "[").concat(i, "]");

          var filterError = function filterError(newErrors, error) {
            if (error.path.startsWith(check) || error.path === check.substr(0, error.path.length)) {
              var newError = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_28__["extend"])({}, error);

              if (error.path.startsWith(check)) {
                newError.path = _this5.path + newError.path.substr(check.length);
              }

              newErrors.push(newError);
            }

            return newErrors;
          };

          editor.showValidationErrors(errors.reduce(filterError, []));
        });
      } else {
        this.editors.forEach(function (editor) {
          if (!editor) return;
          editor.showValidationErrors(errors);
        });
      }
    }
  }, {
    key: "addLinks",
    value: function addLinks() {// multiple editor itself don't create links
    }
  }]);

  return MultipleEditor;
}(_editor_js__WEBPACK_IMPORTED_MODULE_26__["AbstractEditor"]);

/***/ }),

/***/ "./src/editors/multiselect.js":
/*!************************************!*\
  !*** ./src/editors/multiselect.js ***!
  \************************************/
/*! exports provided: MultiSelectEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiSelectEditor", function() { return MultiSelectEditor; });
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.date.to-string.js */ "./node_modules/core-js/modules/es.date.to-string.js");
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ "./node_modules/core-js/modules/es.regexp.to-string.js");
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ "./node_modules/core-js/modules/es.array.is-array.js");
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ "./node_modules/core-js/modules/es.string.includes.js");
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.string.replace.js */ "./node_modules/core-js/modules/es.string.replace.js");
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ "./node_modules/core-js/modules/es.regexp.constructor.js");
/* harmony import */ var core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.string.match.js */ "./node_modules/core-js/modules/es.string.match.js");
/* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.array.reduce.js */ "./node_modules/core-js/modules/es.array.reduce.js");
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.array.join.js */ "./node_modules/core-js/modules/es.array.join.js");
/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_19__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_20__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_21__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_22__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_23__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_24__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_25__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_26__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_27__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_28__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_29__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_30__);
/* harmony import */ var _editor_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../editor.js */ "./src/editor.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

































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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }


var MultiSelectEditor = /*#__PURE__*/function (_AbstractEditor) {
  _inherits(MultiSelectEditor, _AbstractEditor);

  var _super = _createSuper(MultiSelectEditor);

  function MultiSelectEditor() {
    _classCallCheck(this, MultiSelectEditor);

    return _super.apply(this, arguments);
  }

  _createClass(MultiSelectEditor, [{
    key: "onInputChange",
    value: function onInputChange() {
      this.value = this.input.value;
      this.onChange(true);
    }
  }, {
    key: "register",
    value: function register() {
      _get(_getPrototypeOf(MultiSelectEditor.prototype), "register", this).call(this);

      if (!this.input) return;
      this.input.setAttribute('name', this.formname);
    }
  }, {
    key: "unregister",
    value: function unregister() {
      _get(_getPrototypeOf(MultiSelectEditor.prototype), "unregister", this).call(this);

      if (!this.input) return;
      this.input.removeAttribute('name');
    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      var _this = this;

      var longestText = this.getTitle().length;
      Object.keys(this.select_values).forEach(function (i) {
        return longestText = Math.max(longestText, "".concat(_this.select_values[i]).length + 4);
      });
      return Math.min(12, Math.max(longestText / 7, 2));
    }
  }, {
    key: "preBuild",
    value: function preBuild() {
      _get(_getPrototypeOf(MultiSelectEditor.prototype), "preBuild", this).call(this);

      this.select_options = {};
      this.select_values = {};
      this.option_keys = [];
      this.option_titles = [];
      var i;
      var itemsSchema = this.jsoneditor.expandRefs(this.schema.items || {});
      var e = itemsSchema["enum"] || [];
      var t = itemsSchema.options ? itemsSchema.options.enum_titles || [] : [];

      for (i = 0; i < e.length; i++) {
        /* If the sanitized value is different from the enum value, don't include it */
        if (this.sanitize(e[i]) !== e[i]) continue;
        this.option_keys.push("".concat(e[i]));
        this.option_titles.push("".concat(t[i] || e[i]));
        this.select_values["".concat(e[i])] = e[i];
      }
    }
  }, {
    key: "build",
    value: function build() {
      var _this2 = this;

      var i;
      if (!this.options.compact) this.header = this.label = this.theme.getFormInputLabel(this.getTitle(), this.isRequired());
      if (this.schema.description) this.description = this.theme.getFormInputDescription(this.translateProperty(this.schema.description));
      if (this.options.infoText) this.infoButton = this.theme.getInfoButton(this.translateProperty(this.options.infoText));
      if (this.options.compact) this.container.classList.add('compact');

      if (!this.schema.format && this.option_keys.length < 8 || this.schema.format === 'checkbox') {
        this.input_type = 'checkboxes';
        this.inputs = {};
        this.controls = {};

        for (i = 0; i < this.option_keys.length; i++) {
          var id = this.formname + i.toString();
          this.inputs[this.option_keys[i]] = this.theme.getCheckbox();
          this.inputs[this.option_keys[i]].id = id;
          this.select_options[this.option_keys[i]] = this.inputs[this.option_keys[i]];
          var label = this.theme.getCheckboxLabel(this.option_titles[i]);
          label.htmlFor = id;
          this.controls[this.option_keys[i]] = this.theme.getFormControl(label, this.inputs[this.option_keys[i]]);
        }

        this.control = this.theme.getMultiCheckboxHolder(this.controls, this.label, this.description, this.infoButton);
        this.inputs.controlgroup = this.inputs.controls = this.control;
        /* Enable error messages for checkboxes */
      } else {
        this.input_type = 'select';
        this.input = this.theme.getSelectInput(this.option_keys, true);
        this.theme.setSelectOptions(this.input, this.option_keys, this.option_titles);
        /* this.input.multiple = true; */

        this.input.setAttribute('multiple', 'multiple');
        this.input.size = Math.min(10, this.option_keys.length);

        for (i = 0; i < this.option_keys.length; i++) {
          this.select_options[this.option_keys[i]] = this.input.children[i];
        }

        this.control = this.theme.getFormControl(this.label, this.input, this.description, this.infoButton);
      }

      if (this.schema.readOnly || this.schema.readonly) {
        this.disable(true);
      }

      this.container.appendChild(this.control);

      this.multiselectChangeHandler = function (e) {
        var newValue = [];

        for (i = 0; i < _this2.option_keys.length; i++) {
          if (_this2.select_options[_this2.option_keys[i]] && (_this2.select_options[_this2.option_keys[i]].selected || _this2.select_options[_this2.option_keys[i]].checked)) newValue.push(_this2.select_values[_this2.option_keys[i]]);
        }

        _this2.updateValue(newValue);

        _this2.onChange(true);
      };

      this.control.addEventListener('change', this.multiselectChangeHandler, false);
      /* Any special formatting that needs to happen after the input is added to the dom */

      window.requestAnimationFrame(function () {
        _this2.afterInputReady();
      });
    }
  }, {
    key: "postBuild",
    value: function postBuild() {
      _get(_getPrototypeOf(MultiSelectEditor.prototype), "postBuild", this).call(this);
      /* this.theme.afterInputReady(this.input || this.inputs); */

    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady() {
      this.theme.afterInputReady(this.input || this.inputs);
    }
  }, {
    key: "setValue",
    value: function setValue(value, initial) {
      var _this3 = this;

      value = value || [];
      if (!Array.isArray(value)) value = [value];
      /* Make sure we are dealing with an array of strings so we can check for strict equality */

      value = value.map(function (e) {
        return "".concat(e);
      });
      /* Update selected status of options */

      Object.keys(this.select_options).forEach(function (i) {
        _this3.select_options[i][_this3.input_type === 'select' ? 'selected' : 'checked'] = value.includes(i);
      });
      this.updateValue(value);
      this.onChange(true);
    }
  }, {
    key: "removeValue",
    value: function removeValue(value) {
      /* Remove from existing value(s) */
      value = [].concat(value);
      this.setValue(this.getValue().filter(function (item) {
        return !value.includes(item);
      }));
    }
  }, {
    key: "addValue",
    value: function addValue(value) {
      /* Add to existing value(s) */
      this.setValue(this.getValue().concat(value));
    }
  }, {
    key: "updateValue",
    value: function updateValue(value) {
      var changed = false;
      var newValue = [];

      for (var i = 0; i < value.length; i++) {
        if (!this.select_options["".concat(value[i])]) {
          changed = true;
          continue;
        }

        var sanitized = this.sanitize(this.select_values[value[i]]);
        newValue.push(sanitized);
        if (sanitized !== value[i]) changed = true;
      }

      this.value = newValue;
      return changed;
    }
  }, {
    key: "sanitize",
    value: function sanitize(value) {
      if (this.schema.items.type === 'boolean') return !!value;else if (this.schema.items.type === 'number') return 1 * value || 0;else if (this.schema.items.type === 'integer') return Math.floor(value * 1 || 0);
      return "".concat(value);
    }
  }, {
    key: "enable",
    value: function enable() {
      var _this4 = this;

      if (!this.always_disabled) {
        if (this.input) {
          this.input.disabled = false;
        } else if (this.inputs) {
          Object.keys(this.inputs).forEach(function (i) {
            return _this4.inputs[i].disabled = false;
          });
        }

        _get(_getPrototypeOf(MultiSelectEditor.prototype), "enable", this).call(this);
      }
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      var _this5 = this;

      if (alwaysDisabled) this.always_disabled = true;

      if (this.input) {
        this.input.disabled = true;
      } else if (this.inputs) {
        Object.keys(this.inputs).forEach(function (i) {
          return _this5.inputs[i].disabled = true;
        });
      }

      _get(_getPrototypeOf(MultiSelectEditor.prototype), "disable", this).call(this);
    }
  }, {
    key: "destroy",
    value: function destroy() {
      _get(_getPrototypeOf(MultiSelectEditor.prototype), "destroy", this).call(this);
    }
  }, {
    key: "escapeRegExp",
    value: function escapeRegExp(string) {
      return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
    }
  }, {
    key: "showValidationErrors",
    value: function showValidationErrors(errors) {
      var regexPath = new RegExp("^".concat(this.escapeRegExp(this.path), "(\\.\\d+)?$"));

      var addMessage = function addMessage(messages, error) {
        if (error.path.match(regexPath)) {
          messages.push(error.message);
        }

        return messages;
      };

      var messages = errors.reduce(addMessage, []);

      if (messages.length) {
        this.theme.addInputError(this.input || this.inputs, "".concat(messages.join('. '), "."));
      } else {
        this.theme.removeInputError(this.input || this.inputs);
      }
    }
  }]);

  return MultiSelectEditor;
}(_editor_js__WEBPACK_IMPORTED_MODULE_31__["AbstractEditor"]);

/***/ }),

/***/ "./src/editors/null.js":
/*!*****************************!*\
  !*** ./src/editors/null.js ***!
  \*****************************/
/*! exports provided: NullEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NullEditor", function() { return NullEditor; });
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var _editor_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../editor.js */ "./src/editor.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }














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); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }


var NullEditor = /*#__PURE__*/function (_AbstractEditor) {
  _inherits(NullEditor, _AbstractEditor);

  var _super = _createSuper(NullEditor);

  function NullEditor() {
    _classCallCheck(this, NullEditor);

    return _super.apply(this, arguments);
  }

  _createClass(NullEditor, [{
    key: "getValue",
    value: function getValue() {
      if (!this.dependenciesFulfilled) {
        return undefined;
      }

      return null;
    }
  }, {
    key: "setValue",
    value: function setValue() {
      this.onChange();
    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      return 2;
    }
  }]);

  return NullEditor;
}(_editor_js__WEBPACK_IMPORTED_MODULE_12__["AbstractEditor"]);

/***/ }),

/***/ "./src/editors/number.js":
/*!*******************************!*\
  !*** ./src/editors/number.js ***!
  \*******************************/
/*! exports provided: NumberEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberEditor", function() { return NumberEditor; });
/* harmony import */ var core_js_modules_es_parse_float_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.parse-float.js */ "./node_modules/core-js/modules/es.parse-float.js");
/* harmony import */ var core_js_modules_es_parse_float_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_parse_float_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./string.js */ "./src/editors/string.js");
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utilities */ "./src/utilities.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var NumberEditor = /*#__PURE__*/function (_StringEditor) {
  _inherits(NumberEditor, _StringEditor);

  var _super = _createSuper(NumberEditor);

  function NumberEditor() {
    _classCallCheck(this, NumberEditor);

    return _super.apply(this, arguments);
  }

  _createClass(NumberEditor, [{
    key: "build",
    value: function build() {
      _get(_getPrototypeOf(NumberEditor.prototype), "build", this).call(this);

      if (typeof this.schema.minimum !== 'undefined') {
        var minimum = this.schema.minimum;

        if (typeof this.schema.exclusiveMinimum !== 'undefined') {
          minimum += 1;
        }

        this.input.setAttribute('min', minimum);
      }

      if (typeof this.schema.maximum !== 'undefined') {
        var maximum = this.schema.maximum;

        if (typeof this.schema.exclusiveMaximum !== 'undefined') {
          maximum -= 1;
        }

        this.input.setAttribute('max', maximum);
      }

      if (typeof this.schema.step !== 'undefined') {
        var step = this.schema.step || 1;
        this.input.setAttribute('step', step);
      }
      /* Set custom attributes on input element. Parameter is array of protected keys. Empty array if none. */


      this.setInputAttributes(['maxlength', 'pattern', 'readonly', 'min', 'max', 'step']);
    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      return 2;
    }
  }, {
    key: "getValue",
    value: function getValue() {
      if (!this.dependenciesFulfilled) {
        return undefined;
      }

      var value = Object(_utilities__WEBPACK_IMPORTED_MODULE_16__["isNumber"])(this.value) ? parseFloat(this.value) : this.value;

      if (!this.jsoneditor.options.use_default_values && value === '') {
        return undefined;
      }

      return value;
    }
  }]);

  return NumberEditor;
}(_string_js__WEBPACK_IMPORTED_MODULE_15__["StringEditor"]);

/***/ }),

/***/ "./src/editors/object.css.js":
/*!***********************************!*\
  !*** ./src/editors/object.css.js ***!
  \***********************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* eslint-disable */
/* harmony default export */ __webpack_exports__["default"] = ({
  ".je-object__title": "display:inline-block",
  ".je-object__controls": "margin:0%200%200%2010px",
  ".je-object__container": "position:relative",
  ".je-object__property-checkbox": "margin:0;height:auto",
  ".property-selector": "width:295px;max-height:160px;padding:5px%200;overflow-y:auto;overflow-x:hidden;padding-left:5px",
  ".property-selector-input": "width:220px;margin-bottom:0;display:inline-block",
  ".json-editor-btntype-toggle": "margin:0%2010px%200%200",
  ".je-edit-json--textarea": "height:170px%20!important;width:300px%20!important;display:block"
});
/* eslint-enable */

/***/ }),

/***/ "./src/editors/object.js":
/*!*******************************!*\
  !*** ./src/editors/object.js ***!
  \*******************************/
/*! exports provided: ObjectEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectEditor", function() { return ObjectEditor; });
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.values.js */ "./node_modules/core-js/modules/es.object.values.js");
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.array.sort.js */ "./node_modules/core-js/modules/es.array.sort.js");
/* harmony import */ var core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ "./node_modules/core-js/modules/es.regexp.constructor.js");
/* harmony import */ var core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ "./node_modules/core-js/modules/es.regexp.to-string.js");
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.object.entries.js */ "./node_modules/core-js/modules/es.object.entries.js");
/* harmony import */ var core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ "./node_modules/core-js/modules/es.array.is-array.js");
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ "./node_modules/core-js/modules/es.string.includes.js");
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_function_bind_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.function.bind.js */ "./node_modules/core-js/modules/es.function.bind.js");
/* harmony import */ var core_js_modules_es_function_bind_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_bind_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.array.reduce.js */ "./node_modules/core-js/modules/es.array.reduce.js");
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.array.find.js */ "./node_modules/core-js/modules/es.array.find.js");
/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_19__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_20__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_21__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_22__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_23__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_24__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_25__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_26__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_27__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_28__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_29__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_30__);
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_31__);
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_32___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_32__);
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js");
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_33___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_33__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_34___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_34__);
/* harmony import */ var core_js_modules_es_object_define_properties_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! core-js/modules/es.object.define-properties.js */ "./node_modules/core-js/modules/es.object.define-properties.js");
/* harmony import */ var core_js_modules_es_object_define_properties_js__WEBPACK_IMPORTED_MODULE_35___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_properties_js__WEBPACK_IMPORTED_MODULE_35__);
/* harmony import */ var _editor_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../editor.js */ "./src/editor.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
/* harmony import */ var _object_css_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./object.css.js */ "./src/editors/object.css.js");
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

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






































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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }




var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
  _inherits(ObjectEditor, _AbstractEditor);

  var _super = _createSuper(ObjectEditor);

  function ObjectEditor(options, defaults, depth) {
    var _this;

    _classCallCheck(this, ObjectEditor);

    _this = _super.call(this, options, defaults);
    _this.currentDepth = depth;
    return _this;
  }

  _createClass(ObjectEditor, [{
    key: "getDefault",
    value: function getDefault() {
      return Object(_utilities_js__WEBPACK_IMPORTED_MODULE_37__["extend"])({}, this.schema["default"] || {});
    }
  }, {
    key: "getChildEditors",
    value: function getChildEditors() {
      return this.editors;
    }
  }, {
    key: "register",
    value: function register() {
      _get(_getPrototypeOf(ObjectEditor.prototype), "register", this).call(this);

      if (this.editors) {
        Object.values(this.editors).forEach(function (e) {
          return e.register();
        });
      }
    }
  }, {
    key: "unregister",
    value: function unregister() {
      _get(_getPrototypeOf(ObjectEditor.prototype), "unregister", this).call(this);

      if (this.editors) {
        Object.values(this.editors).forEach(function (e) {
          return e.unregister();
        });
      }
    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      return Math.max(Math.min(12, this.maxwidth), 3);
    }
  }, {
    key: "enable",
    value: function enable() {
      if (!this.always_disabled) {
        if (this.editjson_control) this.editjson_control.disabled = false;
        if (this.addproperty_button) this.addproperty_button.disabled = false;

        _get(_getPrototypeOf(ObjectEditor.prototype), "enable", this).call(this);

        if (this.editors) {
          Object.values(this.editors).forEach(function (e) {
            if (e.isActive()) {
              e.enable();
            }

            e.optInCheckbox.disabled = false;
          });
        }
      }
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      if (alwaysDisabled) this.always_disabled = true;
      if (this.editjson_control) this.editjson_control.disabled = true;
      if (this.addproperty_button) this.addproperty_button.disabled = true;
      this.hideEditJSON();

      _get(_getPrototypeOf(ObjectEditor.prototype), "disable", this).call(this);

      if (this.editors) {
        Object.values(this.editors).forEach(function (e) {
          if (e.isActive()) {
            e.disable(alwaysDisabled);
          }

          e.optInCheckbox.disabled = true;
        });
      }
    }
  }, {
    key: "layoutEditors",
    value: function layoutEditors() {
      var _this2 = this;

      var i;
      var j;
      if (!this.row_container) return;
      /* Sort editors by propertyOrder */

      this.property_order = Object.keys(this.editors);
      this.property_order = this.property_order.sort(function (a, b) {
        var ordera = _this2.editors[a].schema.propertyOrder;
        var orderb = _this2.editors[b].schema.propertyOrder;
        if (typeof ordera !== 'number') ordera = 1000;
        if (typeof orderb !== 'number') orderb = 1000;
        return ordera - orderb;
      });
      var container;
      var isCategoriesFormat = this.format === 'categories';
      var rows = [];
      var key = null;
      var editor = null;
      var row;

      if (this.format === 'grid-strict') {
        var rowIndex = 0;
        row = [];
        this.property_order.forEach(function (key) {
          var editor = _this2.editors[key];

          if (editor.property_removed) {
            return;
          }

          var width = editor.options.hidden ? 0 : editor.options.grid_columns || editor.getNumColumns();
          var offset = editor.options.hidden ? 0 : editor.options.grid_offset || 0;
          var gridBreak = editor.options.hidden ? false : editor.options.grid_break || false;
          var height = editor.options.hidden ? 0 : editor.container.offsetHeight;
          var column = {
            key: key,
            width: width,
            offset: offset,
            height: height
          };
          row.push(column);
          rows[rowIndex] = row;

          if (gridBreak) {
            rowIndex++;
            row = [];
          }
        });
        /* layout hasn't changed */

        if (this.layout === JSON.stringify(rows)) return false;
        this.layout = JSON.stringify(rows);
        /* Layout the form */

        container = document.createElement('div');

        for (i = 0; i < rows.length; i++) {
          row = this.theme.getGridRow();
          container.appendChild(row);

          for (j = 0; j < rows[i].length; j++) {
            key = rows[i][j].key;
            editor = this.editors[key];

            if (editor.options.hidden) {
              editor.container.style.display = 'none';
            } else {
              this.theme.setGridColumnSize(editor.container, rows[i][j].width, rows[i][j].offset);
            }

            row.appendChild(editor.container);
          }
        }
      } else if (this.format === 'grid') {
        this.property_order.forEach(function (key) {
          var editor = _this2.editors[key];
          if (editor.property_removed) return;
          var found = false;
          var width = editor.options.hidden ? 0 : editor.options.grid_columns || editor.getNumColumns();
          var height = editor.options.hidden ? 0 : editor.container.offsetHeight;
          /* See if the editor will fit in any of the existing rows first */

          for (var _i = 0; _i < rows.length; _i++) {
            /* If the editor will fit in the row horizontally */
            if (rows[_i].width + width <= 12) {
              /* If the editor is close to the other elements in height */

              /* i.e. Don't put a really tall editor in an otherwise short row or vice versa */
              if (!height || rows[_i].minh * 0.5 < height && rows[_i].maxh * 2 > height) {
                found = _i;
              }
            }
          }
          /* If there isn't a spot in any of the existing rows, start a new row */


          if (found === false) {
            rows.push({
              width: 0,
              minh: 999999,
              maxh: 0,
              editors: []
            });
            found = rows.length - 1;
          }

          rows[found].editors.push({
            key: key,

            /* editor: editor, */
            width: width,
            height: height
          });
          rows[found].width += width;
          rows[found].minh = Math.min(rows[found].minh, height);
          rows[found].maxh = Math.max(rows[found].maxh, height);
        });
        /* Make almost full rows width 12 */

        /* Do this by increasing all editors' sizes proprotionately */

        /* Any left over space goes to the biggest editor */

        /* Don't touch rows with a width of 6 or less */

        for (i = 0; i < rows.length; i++) {
          if (rows[i].width < 12) {
            var biggest = false;
            var newWidth = 0;

            for (j = 0; j < rows[i].editors.length; j++) {
              if (biggest === false) biggest = j;else if (rows[i].editors[j].width > rows[i].editors[biggest].width) biggest = j;
              rows[i].editors[j].width *= 12 / rows[i].width;
              rows[i].editors[j].width = Math.floor(rows[i].editors[j].width);
              newWidth += rows[i].editors[j].width;
            }

            if (newWidth < 12) rows[i].editors[biggest].width += 12 - newWidth;
            rows[i].width = 12;
          }
        }
        /* layout hasn't changed */


        if (this.layout === JSON.stringify(rows)) return false;
        this.layout = JSON.stringify(rows);
        /* Layout the form */

        container = document.createElement('div');

        for (i = 0; i < rows.length; i++) {
          row = this.theme.getGridRow();
          container.appendChild(row);

          for (j = 0; j < rows[i].editors.length; j++) {
            key = rows[i].editors[j].key;
            editor = this.editors[key];
            if (editor.options.hidden) editor.container.style.display = 'none';else this.theme.setGridColumnSize(editor.container, rows[i].editors[j].width);
            row.appendChild(editor.container);
          }
        }
        /* Normal layout */

      } else {
        container = document.createElement('div');

        if (isCategoriesFormat) {
          /* A container for properties not object nor arrays */
          var containerSimple = document.createElement('div');
          /* This will be the place to (re)build tabs and panes */

          /* tabs_holder has 2 childs, [0]: ul.nav.nav-tabs and [1]: div.tab-content */

          var newTabsHolder = this.theme.getTopTabHolder(this.translateProperty(this.schema.title));
          /* child [1] of previous, stores panes */

          var newTabPanesContainer = this.theme.getTopTabContentHolder(newTabsHolder);
          this.property_order.forEach(function (key) {
            var editor = _this2.editors[key];
            if (editor.property_removed) return;

            var aPane = _this2.theme.getTabContent();

            var isObjOrArray = editor.schema && (editor.schema.type === 'object' || editor.schema.type === 'array');
            /* mark the pane */

            aPane.isObjOrArray = isObjOrArray;

            var gridRow = _this2.theme.getGridRow();
            /* this happens with added properties, they don't have a tab */


            if (!editor.tab) {
              /* Pass the pane which holds the editor */
              if (typeof _this2.basicPane === 'undefined') {
                /* There is no basicPane yet, so aPane will be it */
                _this2.addRow(editor, newTabsHolder, aPane);
              } else {
                _this2.addRow(editor, newTabsHolder, _this2.basicPane);
              }
            }

            aPane.id = _this2.getValidId(editor.tab_text.textContent);
            /* For simple properties, add them on the same panel (Basic) */

            if (!isObjOrArray) {
              containerSimple.appendChild(gridRow);
              /* There are already some panes */

              if (newTabPanesContainer.childElementCount > 0) {
                /* If first pane is object or array, insert before a simple pane */
                if (newTabPanesContainer.firstChild.isObjOrArray) {
                  /* Append pane for simple properties */
                  aPane.appendChild(containerSimple);
                  newTabPanesContainer.insertBefore(aPane, newTabPanesContainer.firstChild);
                  /* Add "Basic" tab */

                  _this2.theme.insertBasicTopTab(editor.tab, newTabsHolder);
                  /* newTabs_holder.firstChild.insertBefore(editor.tab,newTabs_holder.firstChild.firstChild); */

                  /* Update the basicPane */


                  editor.basicPane = aPane;
                } else {
                  /* We already have a first "Basic" pane, just add the new property to it, so */

                  /* do nothing; */
                }
                /* There is no pane, so add the first (simple) pane */

              } else {
                /* Append pane for simple properties */
                aPane.appendChild(containerSimple);
                newTabPanesContainer.appendChild(aPane);
                /* Add "Basic" tab */

                /* newTabs_holder.firstChild.appendChild(editor.tab); */

                _this2.theme.addTopTab(newTabsHolder, editor.tab);
                /* Update the basicPane */


                editor.basicPane = aPane;
              }
              /* Objects and arrays earn their own panes */

            } else {
              aPane.appendChild(gridRow);
              newTabPanesContainer.appendChild(aPane);
              /* newTabs_holder.firstChild.appendChild(editor.tab); */

              _this2.theme.addTopTab(newTabsHolder, editor.tab);
            }

            if (editor.options.hidden) editor.container.style.display = 'none';else _this2.theme.setGridColumnSize(editor.container, 12);
            /* Now, add the property editor to the row */

            gridRow.appendChild(editor.container);
            /* Update the rowPane (same as this.rows[x].rowPane) */

            editor.rowPane = aPane;
          });
          /* Erase old panes */

          while (this.tabPanesContainer.firstChild) {
            this.tabPanesContainer.removeChild(this.tabPanesContainer.firstChild);
          }
          /* Erase old tabs and set the new ones */


          var parentTabsHolder = this.tabs_holder.parentNode;
          parentTabsHolder.removeChild(parentTabsHolder.firstChild);
          parentTabsHolder.appendChild(newTabsHolder);
          this.tabPanesContainer = newTabPanesContainer;
          this.tabs_holder = newTabsHolder;
          /* Activate the first tab */

          var firstTab = this.theme.getFirstTab(this.tabs_holder);

          if (firstTab) {
            Object(_utilities_js__WEBPACK_IMPORTED_MODULE_37__["trigger"])(firstTab, 'click');
          }

          return;
          /* Normal layout */
        }

        this.property_order.forEach(function (key) {
          var editor = _this2.editors[key];
          if (editor.property_removed) return;
          row = _this2.theme.getGridRow();
          container.appendChild(row);
          if (editor.options.hidden) editor.container.style.display = 'none';else _this2.theme.setGridColumnSize(editor.container, 12);
          row.appendChild(editor.container);
        });
      }
      /* for grid and normal layout */


      while (this.row_container.firstChild) {
        this.row_container.removeChild(this.row_container.firstChild);
      }

      this.row_container.appendChild(container);
    }
  }, {
    key: "getPropertySchema",
    value: function getPropertySchema(key) {
      var _this3 = this;

      /* Schema declared directly in properties */
      var schema = this.schema.properties[key] || {};
      schema = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_37__["extend"])({}, schema);
      var matched = !!this.schema.properties[key];
      /* Any matching patternProperties should be merged in */

      if (this.schema.patternProperties) {
        Object.keys(this.schema.patternProperties).forEach(function (i) {
          var regex = new RegExp(i);

          if (regex.test(key)) {
            schema.allOf = schema.allOf || [];
            schema.allOf.push(_this3.schema.patternProperties[i]);
            matched = true;
          }
        });
      }
      /* Hasn't matched other rules, use additionalProperties schema */


      if (!matched && this.schema.additionalProperties && _typeof(this.schema.additionalProperties) === 'object') {
        schema = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_37__["extend"])({}, this.schema.additionalProperties);
      }

      return schema;
    }
  }, {
    key: "preBuild",
    value: function preBuild() {
      var _this4 = this;

      _get(_getPrototypeOf(ObjectEditor.prototype), "preBuild", this).call(this);

      this.editors = {};
      this.cached_editors = {};
      this.format = this.options.layout || this.options.object_layout || this.schema.format || this.jsoneditor.options.object_layout || 'normal';
      this.schema.properties = this.schema.properties || {};
      this.minwidth = 0;
      this.maxwidth = 0;
      /* If the object should be rendered as a table row */

      if (this.options.table_row) {
        Object.entries(this.schema.properties).forEach(function (_ref) {
          var _ref2 = _slicedToArray(_ref, 2),
              key = _ref2[0],
              schema = _ref2[1];

          var editor = _this4.jsoneditor.getEditorClass(schema);

          _this4.editors[key] = _this4.jsoneditor.createEditor(editor, {
            jsoneditor: _this4.jsoneditor,
            schema: schema,
            path: "".concat(_this4.path, ".").concat(key),
            parent: _this4,
            compact: true,
            required: true
          }, _this4.currentDepth + 1);

          _this4.editors[key].preBuild();

          var width = _this4.editors[key].options.hidden ? 0 : _this4.editors[key].options.grid_columns || _this4.editors[key].getNumColumns();
          _this4.minwidth += width;
          _this4.maxwidth += width;
        });
        this.no_link_holder = true;
        /* If the object should be rendered as a table */
      } else if (this.options.table) {
        /* TODO: table display format */
        throw new Error('Not supported yet');
        /* If the object should be rendered as a div */
      } else {
        if (!this.schema.defaultProperties) {
          if (this.jsoneditor.options.display_required_only || this.options.display_required_only) {
            this.schema.defaultProperties = Object.keys(this.schema.properties).filter(function (k) {
              return _this4.isRequiredObject({
                key: k,
                schema: _this4.schema.properties[k]
              });
            });
          } else {
            this.schema.defaultProperties = Object.keys(this.schema.properties);
          }
        }
        /* Increase the grid width to account for padding */


        this.maxwidth += 1;
        /* Check for array (eg. meta-schema options is an object) */

        if (Array.isArray(this.schema.defaultProperties)) {
          this.schema.defaultProperties.forEach(function (key) {
            _this4.addObjectProperty(key, true);

            if (_this4.editors[key]) {
              _this4.minwidth = Math.max(_this4.minwidth, _this4.editors[key].options.grid_columns || _this4.editors[key].getNumColumns());
              _this4.maxwidth += _this4.editors[key].options.grid_columns || _this4.editors[key].getNumColumns();
            }
          });
        }
      }
      /* Sort editors by propertyOrder */


      this.property_order = Object.keys(this.editors);
      this.property_order = this.property_order.sort(function (a, b) {
        var ordera = _this4.editors[a].schema.propertyOrder;
        var orderb = _this4.editors[b].schema.propertyOrder;
        if (typeof ordera !== 'number') ordera = 1000;
        if (typeof orderb !== 'number') orderb = 1000;
        return ordera - orderb;
      });
    }
    /* "Borrow" from arrays code */

  }, {
    key: "addTab",
    value: function addTab(idx) {
      var _this5 = this;

      var isObjOrArray = this.rows[idx].schema && (this.rows[idx].schema.type === 'object' || this.rows[idx].schema.type === 'array');

      if (this.tabs_holder) {
        this.rows[idx].tab_text = document.createElement('span');

        if (!isObjOrArray) {
          this.rows[idx].tab_text.textContent = typeof this.schema.basicCategoryTitle === 'undefined' ? 'Basic' : this.schema.basicCategoryTitle;
        } else {
          this.rows[idx].tab_text.textContent = this.rows[idx].getHeaderText();
        }

        this.rows[idx].tab = this.theme.getTopTab(this.rows[idx].tab_text, this.getValidId(this.rows[idx].tab_text.textContent));
        this.rows[idx].tab.addEventListener('click', function (e) {
          _this5.active_tab = _this5.rows[idx].tab;

          _this5.refreshTabs();

          e.preventDefault();
          e.stopPropagation();
        });
      }
    }
  }, {
    key: "addRow",
    value: function addRow(editor, tabHolder, aPane) {
      var rowsLen = this.rows.length;
      var isObjOrArray = editor.schema.type === 'object' || editor.schema.type === 'array';
      /* Add a row */

      this.rows[rowsLen] = editor;
      /* rowPane stores the editor corresponding pane to set the display style when refreshing Tabs */

      this.rows[rowsLen].rowPane = aPane;

      if (!isObjOrArray) {
        /* This is the first simple property to be added, */

        /* add a ("Basic") tab for it and save it's row number */
        if (typeof this.basicTab === 'undefined') {
          this.addTab(rowsLen);
          /* Store the index row of the first simple property added */

          this.basicTab = rowsLen;
          this.basicPane = aPane;
          this.theme.addTopTab(tabHolder, this.rows[rowsLen].tab);
        } else {
          /* Any other simple property gets the same tab (and the same pane) as the first one, */

          /* so, when 'click' event is fired from a row, it gets the correct ("Basic") tab */
          this.rows[rowsLen].tab = this.rows[this.basicTab].tab;
          this.rows[rowsLen].tab_text = this.rows[this.basicTab].tab_text;
          this.rows[rowsLen].rowPane = this.rows[this.basicTab].rowPane;
        }
      } else {
        this.addTab(rowsLen);
        this.theme.addTopTab(tabHolder, this.rows[rowsLen].tab);
      }
    }
    /* Mark the active tab and make visible the corresponding pane, hide others */

  }, {
    key: "refreshTabs",
    value: function refreshTabs(refreshHeaders) {
      var _this6 = this;

      var basicTabPresent = typeof this.basicTab !== 'undefined';
      var basicTabRefreshed = false;
      this.rows.forEach(function (row) {
        /* If it's an orphan row (some property which has been deleted), return */
        if (!row.tab || !row.rowPane || !row.rowPane.parentNode) return;
        if (basicTabPresent && row.tab === _this6.rows[_this6.basicTab].tab && basicTabRefreshed) return;

        if (refreshHeaders) {
          row.tab_text.textContent = row.getHeaderText();
        } else {
          /* All rows of simple properties point to the same tab, so refresh just once */
          if (basicTabPresent && row.tab === _this6.rows[_this6.basicTab].tab) basicTabRefreshed = true;

          if (row.tab === _this6.active_tab) {
            _this6.theme.markTabActive(row);
          } else {
            _this6.theme.markTabInactive(row);
          }
        }
      });
    }
  }, {
    key: "build", // Includes Mahara customisations, look for '// Mahara'
    value: function build() {
      var _this7 = this;

      var isCategoriesFormat = this.format === 'categories';
      this.rows = [];
      this.active_tab = null;
      /* If the object should be rendered as a table row */

      if (this.options.table_row) {
        this.editor_holder = this.container;
        Object.entries(this.editors).forEach(function (_ref3) {
          var _ref4 = _slicedToArray(_ref3, 2),
              key = _ref4[0],
              editor = _ref4[1];

          var holder = _this7.theme.getTableCell();

          _this7.editor_holder.appendChild(holder);

          editor.setContainer(holder);
          editor.build();
          editor.postBuild();
          editor.setOptInCheckbox(editor.header);

          if (_this7.editors[key].options.hidden) {
            holder.style.display = 'none';
          }

          if (_this7.editors[key].options.input_width) {
            holder.style.width = _this7.editors[key].options.input_width;
          }
        });
        /* If the object should be rendered as a table */
      } else if (this.options.table) {
        /* TODO: table display format */
        throw new Error('Not supported yet');
        /* If the object should be rendered as a div */
      } else {
        this.header = '';

        if (!this.options.compact) {
          // this.header = document.createElement('label');
          this.header = document.createElement('span');
          this.header.textContent = this.getTitle();
        }
        this.title = this.theme.getHeader(this.header, this.getPathDepth());
        this.title.classList.add('je-object__title');

        this.controls = this.theme.getButtonHolder();
        this.controls.classList.add('je-object__controls');
        this.container.appendChild(this.title);
        // this.container.appendChild(this.controls); // Mahara
        this.container.classList.add('je-object__container');
        /* Edit JSON modal */

        this.editjson_holder = this.theme.getModal();
        this.editjson_textarea = this.theme.getTextareaInput();
        this.editjson_textarea.classList.add('je-edit-json--textarea');
        this.editjson_save = this.getButton('button_save', 'save', 'button_save');
        this.editjson_save.classList.add('json-editor-btntype-save');
        this.editjson_save.addEventListener('click', function (e) {
          e.preventDefault();
          e.stopPropagation();

          _this7.saveJSON();
        });
        this.editjson_copy = this.getButton('button_copy', 'copy', 'button_copy');
        this.editjson_copy.classList.add('json-editor-btntype-copy');
        this.editjson_copy.addEventListener('click', function (e) {
          e.preventDefault();
          e.stopPropagation();

          _this7.copyJSON();
        });
        this.editjson_cancel = this.getButton('button_cancel', 'cancel', 'button_cancel');
        this.editjson_cancel.classList.add('json-editor-btntype-cancel');
        this.editjson_cancel.addEventListener('click', function (e) {
          e.preventDefault();
          e.stopPropagation();

          _this7.hideEditJSON();
        });
        this.editjson_holder.appendChild(this.editjson_textarea);
        this.editjson_holder.appendChild(this.editjson_save);
        this.editjson_holder.appendChild(this.editjson_copy);
        this.editjson_holder.appendChild(this.editjson_cancel);
        /* Manage Properties modal */

        this.addproperty_holder = this.theme.getModal();
        this.addproperty_list = document.createElement('div');
        this.addproperty_list.classList.add('property-selector');
        this.addproperty_add = this.getButton('button_add', 'add', 'button_add');
        this.addproperty_add.classList.add('json-editor-btntype-add');
        this.addproperty_input = this.theme.getFormInputField('text');
        this.addproperty_input.setAttribute('placeholder', 'Property name...');
        this.addproperty_input.classList.add('property-selector-input');
        this.addproperty_add.addEventListener('click', function (e) {
          e.preventDefault();
          e.stopPropagation();

          if (_this7.addproperty_input.value) {
            if (_this7.editors[_this7.addproperty_input.value]) {
              window.alert('there is already a property with that name');
              return;
            }

            _this7.addObjectProperty(_this7.addproperty_input.value);

            if (_this7.editors[_this7.addproperty_input.value]) {
              _this7.editors[_this7.addproperty_input.value].disable();
            }

            _this7.onChange(true);
          }
        });
        this.addproperty_input.addEventListener('input', function (e) {
          e.target.previousSibling.childNodes.forEach(function (value) {
            if (value.innerText.includes(e.target.value)) {
              value.style.display = '';
            } else {
              value.style.display = 'none';
            }
          });
        });
        this.addproperty_holder.appendChild(this.addproperty_list);
        this.addproperty_holder.appendChild(this.addproperty_input);
        this.addproperty_holder.appendChild(this.addproperty_add);
        var spacer = document.createElement('div');
        spacer.style.clear = 'both';
        this.addproperty_holder.appendChild(spacer);
        /* Close properties modal if clicked outside modal */

        document.addEventListener('click', this.onOutsideModalClick.bind(this));
        /* Description */

        if (this.schema.description) {
          this.description = this.theme.getDescription(this.translateProperty(this.schema.description));
          this.container.appendChild(this.description);
        }
        /* Validation error placeholder area */


        this.error_holder = document.createElement('div');
        this.container.appendChild(this.error_holder);
        /* Container for child editor area */

        this.editor_holder = this.theme.getIndentedPanel();
        this.container.appendChild(this.editor_holder);
        /* Container for rows of child editors */

        this.row_container = this.theme.getGridContainer();

        if (isCategoriesFormat) {
          this.tabs_holder = this.theme.getTopTabHolder(this.getValidId(this.translateProperty(this.schema.title)));
          this.tabPanesContainer = this.theme.getTopTabContentHolder(this.tabs_holder);
          this.editor_holder.appendChild(this.tabs_holder);
        } else {
          this.tabs_holder = this.theme.getTabHolder(this.getValidId(this.translateProperty(this.schema.title)));
          this.tabPanesContainer = this.theme.getTabContentHolder(this.tabs_holder);
          this.editor_holder.appendChild(this.row_container);
        }

        Object.values(this.editors).forEach(function (editor) {
          var aPane = _this7.theme.getTabContent();

          var holder = _this7.theme.getGridColumn();

          var isObjOrArray = !!(editor.schema && (editor.schema.type === 'object' || editor.schema.type === 'array'));
          aPane.isObjOrArray = isObjOrArray;

          if (isCategoriesFormat) {
            if (isObjOrArray) {
              var singleRowContainer = _this7.theme.getGridContainer();

              singleRowContainer.appendChild(holder);
              aPane.appendChild(singleRowContainer);

              _this7.tabPanesContainer.appendChild(aPane);

              _this7.row_container = singleRowContainer;
            } else {
              if (typeof _this7.row_container_basic === 'undefined') {
                _this7.row_container_basic = _this7.theme.getGridContainer();
                aPane.appendChild(_this7.row_container_basic);

                if (_this7.tabPanesContainer.childElementCount === 0) {
                  _this7.tabPanesContainer.appendChild(aPane);
                } else {
                  _this7.tabPanesContainer.insertBefore(aPane, _this7.tabPanesContainer.childNodes[1]);
                }
              }

              _this7.row_container_basic.appendChild(holder);
            }

            _this7.addRow(editor, _this7.tabs_holder, aPane);

            aPane.id = _this7.getValidId(editor.schema.title);
            /* editor.schema.path//tab_text.textContent */
          } else {
            _this7.row_container.appendChild(holder);
          }

          editor.setContainer(holder);
          editor.build();
          editor.postBuild();
          editor.setOptInCheckbox(editor.header);
        });

        if (this.rows[0]) {
          Object(_utilities_js__WEBPACK_IMPORTED_MODULE_37__["trigger"])(this.rows[0].tab, 'click');
        }
        /* Show/Hide button */


        this.collapsed = false;
        // Mahara custom
        this.collapse_control = this.getButton(this.translate('button_collapse'), 'collapse', this.translate('button_collapse_title',[_this7.getTitle()]));
        this.collapse_control.classList.add('json-editor-btntype-toggle');
        this.collapse_control.setAttribute('aria-expanded', 'true'); // Mahara
        this.collapse_control.removeAttribute('title'); // Mahara
        this.title.after(this.collapse_control); // Mahara
        this.collapse_control.addEventListener('click', function (e) {
          e.preventDefault();
          e.stopPropagation();

          if (_this7.collapsed) {
            _this7.collapse_control.setAttribute('aria-expanded', 'true'); // Mahara
            _this7.editor_holder.style.display = '';
            _this7.collapsed = false;

            _this7.setButtonText(this,_this7.translate('button_collapse'),'collapse',_this7.translate('button_collapse_title',[_this7.getTitle()]));;
          } else {
            _this7.collapse_control.setAttribute('aria-expanded', 'false'); // Mahara
            _this7.editor_holder.style.display = 'none';
            _this7.collapsed = true;

            _this7.setButtonText(this,_this7.translate('button_expand'),'expand',_this7.translate('button_expand_title',[_this7.getTitle()])); // Mahara
          }
        });
        /* If it should start collapsed */

        if (this.options.collapsed) {
          Object(_utilities_js__WEBPACK_IMPORTED_MODULE_37__["trigger"])(this.collapse_control, 'click');
        }
        /* Collapse button disabled */


        if (this.schema.options && typeof this.schema.options.disable_collapse !== 'undefined') {
          if (this.schema.options.disable_collapse) this.collapse_control.style.display = 'none';
        } else if (this.jsoneditor.options.disable_collapse) {
          this.collapse_control.style.display = 'none';
        }
        /* Edit JSON Button */
        // Mahara specific change - make translatable - or add ability to change title on button.

        // this.editjson_control = this.getButton('JSON', 'edit', 'button_edit_json'); // original
        this.editjson_control = this.getButton('', 'edit', this.translate('button_edit_json')); // Mahara

        this.editjson_control.classList.add('json-editor-btntype-editjson');
        this.editjson_control.addEventListener('click', function (e) {
          e.preventDefault();
          e.stopPropagation();

          _this7.toggleEditJSON();
        });
        this.controls.appendChild(this.editjson_control);
        this.controls.insertBefore(this.editjson_holder, this.controls.childNodes[0]);
        /* Edit JSON Buttton disabled */

        if (this.schema.options && typeof this.schema.options.disable_edit_json !== 'undefined') {
          if (this.schema.options.disable_edit_json) this.editjson_control.style.display = 'none';
        } else if (this.jsoneditor.options.disable_edit_json) {
          this.editjson_control.style.display = 'none';
        }
        /* Object Properties Button */


        this.addproperty_button = this.getButton('properties', 'edit_properties', 'button_object_properties');
        this.addproperty_button.classList.add('json-editor-btntype-properties');
        this.addproperty_button.addEventListener('click', function (e) {
          e.preventDefault();
          e.stopPropagation();

          _this7.toggleAddProperty();
        });
        this.controls.appendChild(this.addproperty_button);
        this.controls.insertBefore(this.addproperty_holder, this.controls.childNodes[1]);
        this.refreshAddProperties();
        /* non required properties start deactivated */

        this.deactivateNonRequiredProperties();
      }
      /* Fix table cell ordering */


      if (this.options.table_row) {
        this.editor_holder = this.container;
        this.property_order.forEach(function (key) {
          _this7.editor_holder.appendChild(_this7.editors[key].container);
        });
        /* Layout object editors in grid if needed */
      } else {
        /* Initial layout */
        this.layoutEditors();
        /* Do it again now that we know the approximate heights of elements */

        this.layoutEditors();
      }
    }
  }, {
    key: "deactivateNonRequiredProperties",
    value: function deactivateNonRequiredProperties() {
      var _this8 = this;

      /* the show_opt_in editor option is for backward compatibility */
      var globalOptIn = this.jsoneditor.options.show_opt_in;
      var editorOptInDefined = typeof this.options.show_opt_in !== 'undefined';
      var editorOptInEnabled = editorOptInDefined && this.options.show_opt_in === true;
      var editorOptInDisabled = editorOptInDefined && this.options.show_opt_in === false;

      if (editorOptInEnabled || !editorOptInDisabled && globalOptIn || !editorOptInDefined && globalOptIn) {
        Object.entries(this.editors).forEach(function (_ref5) {
          var _ref6 = _slicedToArray(_ref5, 2),
              key = _ref6[0],
              editor = _ref6[1];

          if (!_this8.isRequiredObject(editor)) {
            _this8.editors[key].deactivate();
          }
        });
      }
    }
  }, {
    key: "showEditJSON",
    value: function showEditJSON() {
      if (!this.editjson_holder) return;
      this.hideAddProperty();
      /* Position the form directly beneath the button */

      /* TODO: edge detection */

      this.editjson_holder.style.left = "".concat(this.editjson_control.offsetLeft, "px");
      this.editjson_holder.style.top = "".concat(this.editjson_control.offsetTop + this.editjson_control.offsetHeight, "px");
      /* Start the textarea with the current value */

      this.editjson_textarea.value = JSON.stringify(this.getValue(), null, 2);
      /* Disable the rest of the form while editing JSON */

      this.disable();
      this.editjson_holder.style.display = '';
      this.editjson_control.disabled = false; // Mahara customisation - edit json button
      this.editing_json = true;
    }
  }, {
    key: "hideEditJSON",
    value: function hideEditJSON() {
      if (!this.editjson_holder) return;
      if (!this.editing_json) return;
      this.editjson_holder.style.display = 'none';
      this.enable();
      this.editing_json = false;
    }
  }, {
    key: "copyJSON",
    value: function copyJSON() {
      if (!this.editjson_holder) return;
      var ta = document.createElement('textarea');
      ta.value = this.editjson_textarea.value;
      ta.setAttribute('readonly', '');
      ta.style.position = 'absolute';
      ta.style.left = '-9999px';
      document.body.appendChild(ta);
      ta.select();
      document.execCommand('copy');
      document.body.removeChild(ta);
    }
  }, {
    key: "saveJSON",
    value: function saveJSON() {
      if (!this.editjson_holder) return;

      try {
        var json = JSON.parse(this.editjson_textarea.value);
        this.setValue(json);
        this.hideEditJSON();
        this.onChange(true);
      } catch (e) {
        window.alert('invalid JSON');
        throw e;
      }
    }
  }, {
    key: "toggleEditJSON",
    value: function toggleEditJSON() {
      if (this.editing_json) this.hideEditJSON();else this.showEditJSON();
    }
  }, {
    key: "insertPropertyControlUsingPropertyOrder",
    value: function insertPropertyControlUsingPropertyOrder(property, control, container) {
      var propertyOrder;

      if (this.schema.properties[property]) {
        propertyOrder = this.schema.properties[property].propertyOrder;
      }

      if (typeof propertyOrder !== 'number') propertyOrder = 1000;
      control.propertyOrder = propertyOrder;

      for (var i = 0; i < container.childNodes.length; i++) {
        var child = container.childNodes[i];

        if (control.propertyOrder < child.propertyOrder) {
          this.addproperty_list.insertBefore(control, child);
          control = null;
          break;
        }
      }

      if (control) {
        this.addproperty_list.appendChild(control);
      }
    }
  }, {
    key: "addPropertyCheckbox",
    value: function addPropertyCheckbox(key) {
      var _this9 = this;

      var labelText;
      var checkbox = this.theme.getCheckbox();
      checkbox.style.width = 'auto';

      if (this.schema.properties[key] && this.schema.properties[key].title) {
        labelText = this.schema.properties[key].title;
      } else {
        labelText = key;
      }

      var label = this.theme.getCheckboxLabel(labelText);
      var control = this.theme.getFormControl(label, checkbox);
      control.style.paddingBottom = control.style.marginBottom = control.style.paddingTop = control.style.marginTop = 0;
      control.style.height = 'auto';
      /* control.style.overflowY = 'hidden'; */

      this.insertPropertyControlUsingPropertyOrder(key, control, this.addproperty_list);
      checkbox.checked = key in this.editors;
      checkbox.addEventListener('change', function () {
        if (checkbox.checked) {
          _this9.addObjectProperty(key);
        } else {
          _this9.removeObjectProperty(key);
        }

        _this9.onChange(true);
      });
      this.addproperty_checkboxes[key] = checkbox;
      return checkbox;
    }
  }, {
    key: "showAddProperty",
    value: function showAddProperty() {
      if (!this.addproperty_holder) return;
      this.hideEditJSON();
      /* Position the form directly beneath the button */

      /* TODO: edge detection */

      this.addproperty_holder.style.left = "".concat(this.addproperty_button.offsetLeft, "px");
      this.addproperty_holder.style.top = "".concat(this.addproperty_button.offsetTop + this.addproperty_button.offsetHeight, "px");
      /* Disable the rest of the form while editing JSON */

      this.disable();
      this.adding_property = true;
      this.addproperty_button.disabled = false;
      this.addproperty_holder.style.display = '';
      this.refreshAddProperties();
    }
  }, {
    key: "hideAddProperty",
    value: function hideAddProperty() {
      if (!this.addproperty_holder) return;
      if (!this.adding_property) return;
      this.addproperty_holder.style.display = 'none';
      this.enable();
      this.adding_property = false;
    }
  }, {
    key: "toggleAddProperty",
    value: function toggleAddProperty() {
      if (this.adding_property) this.hideAddProperty();else this.showAddProperty();
    }
  }, {
    key: "removeObjectProperty",
    value: function removeObjectProperty(property) {
      if (this.editors[property]) {
        this.editors[property].unregister();
        delete this.editors[property];
        this.refreshValue();
        this.layoutEditors();
      }
    }
  }, {
    key: "getSchemaOnMaxDepth",
    value: function getSchemaOnMaxDepth(schema) {
      return Object.keys(schema).reduce(function (acc, key) {
        switch (key) {
          case '$ref':
            return acc;

          case 'properties':
          case 'items':
            return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, key, {}));

          case 'additionalProperties':
          case 'propertyNames':
            return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, key, true));

          default:
            return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, key, schema[key]));
        }
      }, {});
    }
  }, {
    key: "addObjectProperty",
    value: function addObjectProperty(name, prebuildOnly) {
      /* Property is already added */
      if (this.editors[name]) return;
      /* Property was added before and is cached */

      if (this.cached_editors[name]) {
        this.editors[name] = this.cached_editors[name];
        if (prebuildOnly) return;
        this.editors[name].register();
        /* New property */
      } else {
        if (!this.canHaveAdditionalProperties() && (!this.schema.properties || !this.schema.properties[name]) && (!this.schema.patternProperties || !Object.keys(this.schema.patternProperties).find(function (i) {
          return new RegExp(i).test(name);
        }))) {
          return;
        }

        var schema = this.getPropertySchema(name);

        if (typeof schema.propertyOrder !== 'number') {
          /* if the propertyOrder undefined, then set a smart default value. */
          schema.propertyOrder = Object.keys(this.editors).length + 1000;
        }
        /* Add the property */


        var editor = this.jsoneditor.getEditorClass(schema);
        var maxDepth = this.jsoneditor.options.max_depth;
        this.editors[name] = this.jsoneditor.createEditor(editor, {
          jsoneditor: this.jsoneditor,
          schema: !!maxDepth && this.currentDepth >= maxDepth ? this.getSchemaOnMaxDepth(schema) : schema,
          path: "".concat(this.path, ".").concat(name),
          parent: this
        }, this.currentDepth + 1);
        this.editors[name].preBuild();

        if (!prebuildOnly) {
          var holder = this.theme.getChildEditorHolder();
          this.editor_holder.appendChild(holder);
          this.editors[name].setContainer(holder);
          this.editors[name].build();
          this.editors[name].postBuild();
          this.editors[name].setOptInCheckbox(editor.header);
          this.editors[name].activate();
        }

        this.cached_editors[name] = this.editors[name];
      }
      /* If we're only prebuilding the editors, don't refresh values */


      if (!prebuildOnly) {
        this.refreshValue();
        this.layoutEditors();
      }
    }
  }, {
    key: "onOutsideModalClick",
    value: function onOutsideModalClick(e) {
      var path = e.path || e.composedPath && e.composedPath();

      if (this.addproperty_holder && !this.addproperty_holder.contains(path[0]) && this.adding_property) {
        e.preventDefault();
        e.stopPropagation();
        this.toggleAddProperty();
      }
    }
  }, {
    key: "onChildEditorChange",
    value: function onChildEditorChange(editor) {
      this.refreshValue();

      _get(_getPrototypeOf(ObjectEditor.prototype), "onChildEditorChange", this).call(this, editor);
    }
  }, {
    key: "canHaveAdditionalProperties",
    value: function canHaveAdditionalProperties() {
      if (typeof this.schema.additionalProperties === 'boolean') {
        return this.schema.additionalProperties;
      }

      return !this.jsoneditor.options.no_additional_properties;
    }
  }, {
    key: "destroy",
    value: function destroy() {
      Object.values(this.cached_editors).forEach(function (el) {
        return el.destroy();
      });
      if (this.editor_holder) this.editor_holder.innerHTML = '';
      if (this.title && this.title.parentNode) this.title.parentNode.removeChild(this.title);
      if (this.error_holder && this.error_holder.parentNode) this.error_holder.parentNode.removeChild(this.error_holder);
      this.editors = null;
      this.cached_editors = null;
      if (this.editor_holder && this.editor_holder.parentNode) this.editor_holder.parentNode.removeChild(this.editor_holder);
      this.editor_holder = null;
      document.removeEventListener('click', this.onOutsideModalClick);

      _get(_getPrototypeOf(ObjectEditor.prototype), "destroy", this).call(this);
    }
  }, {
    key: "getValue",
    value: function getValue() {
      if (!this.dependenciesFulfilled) {
        return undefined;
      }

      var result = _get(_getPrototypeOf(ObjectEditor.prototype), "getValue", this).call(this);

      var isEmpty = function isEmpty(obj) {
        return typeof obj === 'undefined' || obj === '' || obj === Object(obj) && Object.keys(obj).length === 0 && obj.constructor === Object;
      };

      if (result && (this.jsoneditor.options.remove_empty_properties || this.options.remove_empty_properties)) {
        Object.keys(result).forEach(function (key) {
          if (isEmpty(result[key])) {
            delete result[key];
          }
        });
      }

      return result;
    }
  }, {
    key: "refreshValue",
    value: function refreshValue() {
      var _this10 = this;

      this.value = {};

      if (!this.editors) {
        return;
      }

      Object.keys(this.editors).forEach(function (i) {
        if (_this10.editors[i].isActive()) {
          _this10.value[i] = _this10.editors[i].getValue();
        }
      });
      if (this.adding_property) this.refreshAddProperties();
    }
  }, {
    key: "refreshAddProperties",
    value: function refreshAddProperties() {
      var _this11 = this;

      if (this.options.disable_properties || this.options.disable_properties !== false && this.jsoneditor.options.disable_properties) {
        this.addproperty_button.style.display = 'none';
        return;
      }

      var canAdd = false;
      var numProps = 0;
      var showModal = false;
      /* Get number of editors */

      Object.keys(this.editors).forEach(function (i) {
        return numProps++;
      });
      /* Determine if we can add back removed properties */

      canAdd = this.canHaveAdditionalProperties() && !(typeof this.schema.maxProperties !== 'undefined' && numProps >= this.schema.maxProperties);

      if (this.addproperty_checkboxes) {
        this.addproperty_list.innerHTML = '';
      }

      this.addproperty_checkboxes = {};
      /* Check for which editors can't be removed or added back */

      Object.keys(this.cached_editors).forEach(function (i) {
        _this11.addPropertyCheckbox(i);

        if (_this11.isRequiredObject(_this11.cached_editors[i]) && i in _this11.editors) {
          _this11.addproperty_checkboxes[i].disabled = true;
        }

        if (typeof _this11.schema.minProperties !== 'undefined' && numProps <= _this11.schema.minProperties) {
          _this11.addproperty_checkboxes[i].disabled = _this11.addproperty_checkboxes[i].checked;
          if (!_this11.addproperty_checkboxes[i].checked) showModal = true;
        } else if (!(i in _this11.editors)) {
          if (!canAdd && !Object(_utilities_js__WEBPACK_IMPORTED_MODULE_37__["hasOwnProperty"])(_this11.schema.properties, i)) {
            _this11.addproperty_checkboxes[i].disabled = true;
          } else {
            _this11.addproperty_checkboxes[i].disabled = false;
            showModal = true;
          }
        } else {
          showModal = true;
        }
      });

      if (this.canHaveAdditionalProperties()) {
        showModal = true;
      }
      /* Additional addproperty checkboxes not tied to a current editor */


      Object.keys(this.schema.properties).forEach(function (i) {
        if (_this11.cached_editors[i]) return;
        showModal = true;

        _this11.addPropertyCheckbox(i);
      });
      /* If no editors can be added or removed, hide the modal button */

      if (!showModal) {
        this.hideAddProperty();
        this.addproperty_button.style.display = 'none';
        /* If additional properties are disabled */
      } else if (!this.canHaveAdditionalProperties()) {
        this.addproperty_add.style.display = 'none';
        this.addproperty_input.style.display = 'none';
        /* If no new properties can be added */
      } else if (!canAdd) {
        this.addproperty_add.disabled = true;
        /* If new properties can be added */
      } else {
        this.addproperty_add.disabled = false;
      }
    }
  }, {
    key: "isRequiredObject",
    value: function isRequiredObject(editor) {
      if (!editor) {
        return;
      }

      if (typeof editor.schema.required === 'boolean') return editor.schema.required;else if (Array.isArray(this.schema.required)) return this.schema.required.includes(editor.key);else if (this.jsoneditor.options.required_by_default) return true;
      return false;
    }
  }, {
    key: "setValue",
    value: function setValue(value, initial) {
      var _this12 = this;

      value = value || {};
      if (_typeof(value) !== 'object' || Array.isArray(value)) value = {};
      /* First, set the values for all of the defined properties */

      Object.entries(this.cached_editors).forEach(function (_ref7) {
        var _ref8 = _slicedToArray(_ref7, 2),
            i = _ref8[0],
            editor = _ref8[1];

        /* Value explicitly set */
        if (typeof value[i] !== 'undefined') {
          _this12.addObjectProperty(i);

          editor.setValue(value[i], initial);
          editor.activate();
          /* Otherwise, remove value unless this is the initial set or it's required */
        } else if (!initial && !_this12.isRequiredObject(editor)) {
          if (_this12.jsoneditor.options.show_opt_in || _this12.options.show_opt_in) {
            editor.deactivate();
          } else {
            _this12.removeObjectProperty(i);
          }
          /* Otherwise, set the value to the default */

        } else {
          editor.setValue(editor.getDefault(), initial);
        }
      });
      Object.entries(value).forEach(function (_ref9) {
        var _ref10 = _slicedToArray(_ref9, 2),
            i = _ref10[0],
            val = _ref10[1];

        if (!_this12.cached_editors[i]) {
          _this12.addObjectProperty(i);

          if (_this12.editors[i]) _this12.editors[i].setValue(val, initial, !!_this12.editors[i].template);
        }
      });
      this.refreshValue();
      this.layoutEditors();
      this.onChange();
    }
  }, {
    key: "showValidationErrors",
    value: function showValidationErrors(errors) {
      var _this13 = this;

      /* Get all the errors that pertain to this editor */
      var myErrors = [];
      var otherErrors = [];
      errors.forEach(function (error) {
        if (error.path === _this13.path) {
          myErrors.push(error);
        } else {
          otherErrors.push(error);
        }
      });
      /* Show errors for this editor */

      if (this.error_holder) {
        if (myErrors.length) {
          this.error_holder.innerHTML = '';
          this.error_holder.style.display = '';
          myErrors.forEach(function (error) {
            if (error.errorcount && error.errorcount > 1) error.message += " (".concat(error.errorcount, " errors)");

            _this13.error_holder.appendChild(_this13.theme.getErrorMessage(error.message));
          });
          /* Hide error area */
        } else {
          this.error_holder.style.display = 'none';
        }
      }
      /* Show error for the table row if this is inside a table */


      if (this.options.table_row) {
        if (myErrors.length) {
          this.theme.addTableRowError(this.container);
        } else {
          this.theme.removeTableRowError(this.container);
        }
      }
      /* Show errors for child editors */


      Object.values(this.editors).forEach(function (editor) {
        editor.showValidationErrors(otherErrors);
      });
    }
  }]);

  return ObjectEditor;
}(_editor_js__WEBPACK_IMPORTED_MODULE_36__["AbstractEditor"]);
ObjectEditor.rules = _object_css_js__WEBPACK_IMPORTED_MODULE_38__["default"];

/***/ }),

/***/ "./src/editors/radio.js":
/*!******************************!*\
  !*** ./src/editors/radio.js ***!
  \******************************/
/*! exports provided: RadioEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RadioEditor", function() { return RadioEditor; });
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./select.js */ "./src/editors/select.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }


var RadioEditor = /*#__PURE__*/function (_SelectEditor) {
  _inherits(RadioEditor, _SelectEditor);

  var _super = _createSuper(RadioEditor);

  function RadioEditor() {
    _classCallCheck(this, RadioEditor);

    return _super.apply(this, arguments);
  }

  _createClass(RadioEditor, [{
    key: "preBuild",
    value: function preBuild() {
      _get(_getPrototypeOf(RadioEditor.prototype), "preBuild", this).call(this);
    }
  }, {
    key: "build",
    value: function build() {
      var _this = this;

      this.label = '';
      if (!this.options.compact) this.header = this.label = this.theme.getFormInputLabel(this.getTitle(), this.isRequired());
      if (this.schema.description) this.description = this.theme.getFormInputDescription(this.translateProperty(this.schema.description));
      if (this.options.infoText) this.infoButton = this.theme.getInfoButton(this.translateProperty(this.options.infoText));
      if (this.options.compact) this.container.classList.add('compact');
      this.radioContainer = document.createElement('div');
      this.radioGroup = [];

      var radioInputEventhandler = function radioInputEventhandler(e) {
        _this.setValue(e.currentTarget.value);

        _this.onChange(true);
      };

      if (!this.isRequired()) {
        this.enum_display.shift();
        this.enum_options.shift();
        this.enum_values.shift();
      }

      for (var i = 0; i < this.enum_values.length; i++) {
        /* form radio elements */
        this.input = this.theme.getFormRadio({
          name: this.formname,
          id: "".concat(this.formname, "[").concat(i, "]"),
          value: this.enum_values[i]
        });
        /* Set custom attributes on input element. Parameter is array of protected keys. Empty array if none. */

        this.setInputAttributes(['id', 'value', 'name']);
        this.input.addEventListener('change', radioInputEventhandler, false);
        this.radioGroup.push(this.input);
        /* form-label for radio elements */

        var radioLabel = this.theme.getFormRadioLabel(this.enum_display[i]);
        radioLabel.htmlFor = this.input.id;
        var control = this.theme.getFormRadioControl(radioLabel, this.input, !!(this.options.layout === 'horizontal' || this.options.compact));
        this.radioContainer.appendChild(control);
      }

      if (this.schema.readOnly || this.schema.readonly) {
        this.disable(true);

        for (var j = 0; j < this.radioGroup.length; j++) {
          this.radioGroup[j].disabled = true;
        }

        this.radioContainer.classList.add('readonly');
      }

      var radioContainerWrapper = this.theme.getContainer();
      radioContainerWrapper.appendChild(this.radioContainer);
      radioContainerWrapper.dataset.containerFor = 'radio';
      this.input = radioContainerWrapper;
      this.control = this.theme.getFormControl(this.label, radioContainerWrapper, this.description, this.infoButton);
      this.container.appendChild(this.control);
      /* Any special formatting that needs to happen after the input is added to the dom */

      window.requestAnimationFrame(function () {
        if (_this.input.parentNode) _this.afterInputReady();
      });
    }
  }, {
    key: "enable",
    value: function enable() {
      if (!this.always_disabled) {
        for (var i = 0; i < this.radioGroup.length; i++) {
          this.radioGroup[i].disabled = false;
        }

        this.radioContainer.classList.remove('readonly');

        _get(_getPrototypeOf(RadioEditor.prototype), "enable", this).call(this);
      }
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      if (alwaysDisabled) this.always_disabled = true;

      for (var i = 0; i < this.radioGroup.length; i++) {
        this.radioGroup[i].disabled = true;
      }

      this.radioContainer.classList.add('readonly');

      _get(_getPrototypeOf(RadioEditor.prototype), "disable", this).call(this);
    }
  }, {
    key: "destroy",
    value: function destroy() {
      if (this.radioContainer.parentNode && this.radioContainer.parentNode.parentNode) this.radioContainer.parentNode.parentNode.removeChild(this.radioContainer.parentNode);
      if (this.label && this.label.parentNode) this.label.parentNode.removeChild(this.label);
      if (this.description && this.description.parentNode) this.description.parentNode.removeChild(this.description);

      _get(_getPrototypeOf(RadioEditor.prototype), "destroy", this).call(this);
    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      return 2;
    }
  }, {
    key: "setValue",
    value: function setValue(val) {
      for (var i = 0; i < this.radioGroup.length; i++) {
        if (this.radioGroup[i].value === val) {
          this.radioGroup[i].checked = true;
          this.value = val;
          this.onChange();
          break;
        }
      }
    }
  }]);

  return RadioEditor;
}(_select_js__WEBPACK_IMPORTED_MODULE_15__["SelectEditor"]);

/***/ }),

/***/ "./src/editors/sceditor.js":
/*!*********************************!*\
  !*** ./src/editors/sceditor.js ***!
  \*********************************/
/*! exports provided: ScEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScEditor", function() { return ScEditor; });
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./string.js */ "./src/editors/string.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var ScEditor = /*#__PURE__*/function (_StringEditor) {
  _inherits(ScEditor, _StringEditor);

  var _super = _createSuper(ScEditor);

  function ScEditor() {
    _classCallCheck(this, ScEditor);

    return _super.apply(this, arguments);
  }

  _createClass(ScEditor, [{
    key: "setValue",
    value: function setValue(value, initial, fromTemplate) {
      var res = _get(_getPrototypeOf(ScEditor.prototype), "setValue", this).call(this, value, initial, fromTemplate);

      if (res !== undefined && res.changed && this.sceditor_instance) this.sceditor_instance.val(res.value);
    }
  }, {
    key: "build",
    value: function build() {
      this.options.format = 'textarea';
      /* Force format into "textarea" */

      _get(_getPrototypeOf(ScEditor.prototype), "build", this).call(this);

      this.input_type = this.schema.format;
      /* Restore original format */

      this.input.setAttribute('data-schemaformat', this.input_type);
    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady() {
      var _this = this;

      if (window.sceditor) {
        /* Get options, either global options from "this.defaults.options.sceditor" or */

        /* single property options from schema "options.sceditor" */
        var options = this.expandCallbacks('sceditor', Object(_utilities_js__WEBPACK_IMPORTED_MODULE_15__["extend"])({}, {
          format: this.input_type,
          emoticonsEnabled: false,
          width: '100%',
          height: 300,
          readOnly: this.schema.readOnly || this.schema.readonly || this.schema.template
        }, this.defaults.options.sceditor || {}, this.options.sceditor || {}, {
          element: this.input
        }));
        var instance = window.sceditor.instance(this.input);

        if (instance === undefined) {
          window.sceditor.create(this.input, options);
          /* Create doesn't return instance. */
        }

        this.sceditor_instance = instance || window.sceditor.instance(this.input);
        /* Listen for changes */

        this.sceditor_instance.blur(function () {
          _this.value = _this.sceditor_instance.val();

          _this.sceditor_instance.updateOriginal();

          _this.is_dirty = true;

          _this.onChange(true);
        });
        this.theme.afterInputReady(this.input);
      } else _get(_getPrototypeOf(ScEditor.prototype), "afterInputReady", this).call(this);
      /* Library not loaded, so just treat this as a string */

    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      return 6;
    }
  }, {
    key: "enable",
    value: function enable() {
      if (!this.always_disabled && this.sceditor_instance) this.sceditor_instance.readOnly(false);

      _get(_getPrototypeOf(ScEditor.prototype), "enable", this).call(this);
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      if (this.sceditor_instance) this.sceditor_instance.readOnly(true);

      _get(_getPrototypeOf(ScEditor.prototype), "disable", this).call(this, alwaysDisabled);
    }
  }, {
    key: "destroy",
    value: function destroy() {
      if (this.sceditor_instance) {
        this.sceditor_instance.destroy();
        this.sceditor_instance = null;
      }

      _get(_getPrototypeOf(ScEditor.prototype), "destroy", this).call(this);
    }
  }]);

  return ScEditor;
}(_string_js__WEBPACK_IMPORTED_MODULE_14__["StringEditor"]);

/***/ }),

/***/ "./src/editors/select.js":
/*!*******************************!*\
  !*** ./src/editors/select.js ***!
  \*******************************/
/*! exports provided: SelectEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectEditor", function() { return SelectEditor; });
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ "./node_modules/core-js/modules/es.string.includes.js");
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_array_index_of_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.index-of.js */ "./node_modules/core-js/modules/es.array.index-of.js");
/* harmony import */ var core_js_modules_es_array_index_of_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_index_of_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ "./node_modules/core-js/modules/es.array.is-array.js");
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.array.sort.js */ "./node_modules/core-js/modules/es.array.sort.js");
/* harmony import */ var core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_function_bind_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.function.bind.js */ "./node_modules/core-js/modules/es.function.bind.js");
/* harmony import */ var core_js_modules_es_function_bind_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_bind_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.array.reduce.js */ "./node_modules/core-js/modules/es.array.reduce.js");
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.array.join.js */ "./node_modules/core-js/modules/es.array.join.js");
/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_19__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_20__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_21__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_22__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_23__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_24__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_25__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_26__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_27__);
/* harmony import */ var _editor_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../editor.js */ "./src/editor.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }






























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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var SelectEditor = /*#__PURE__*/function (_AbstractEditor) {
  _inherits(SelectEditor, _AbstractEditor);

  var _super = _createSuper(SelectEditor);

  function SelectEditor() {
    _classCallCheck(this, SelectEditor);

    return _super.apply(this, arguments);
  }

  _createClass(SelectEditor, [{
    key: "setValue",
    value: function setValue(value, initial) {
      /* Sanitize value before setting it */
      var sanitized = this.typecast(value);
      var haveToUseDefaultValue = !!this.jsoneditor.options.use_default_values || typeof this.schema["default"] !== 'undefined';

      if (this.enum_options.length > 0 && !this.enum_values.includes(sanitized) || initial && !this.isRequired() && !haveToUseDefaultValue) {
        sanitized = this.enum_values[0];
      }

      if (this.value === sanitized) return;
      if (initial) this.is_dirty = false;else if (this.jsoneditor.options.show_errors === 'change') this.is_dirty = true;
      this.input.value = this.enum_options[this.enum_values.indexOf(sanitized)];
      this.value = sanitized;
      this.onChange();
      this.change();
    }
  }, {
    key: "register",
    value: function register() {
      _get(_getPrototypeOf(SelectEditor.prototype), "register", this).call(this);

      if (!this.input) return;
      this.input.setAttribute('name', this.formname);
    }
  }, {
    key: "unregister",
    value: function unregister() {
      _get(_getPrototypeOf(SelectEditor.prototype), "unregister", this).call(this);

      if (!this.input) return;
      this.input.removeAttribute('name');
    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      if (!this.enum_options) return 3;
      var longestText = this.getTitle().length;

      for (var i = 0; i < this.enum_options.length; i++) {
        longestText = Math.max(longestText, this.enum_options[i].length + 4);
      }

      return Math.min(12, Math.max(longestText / 7, 2));
    }
  }, {
    key: "typecast",
    value: function typecast(value) {
      if (this.schema.type === 'boolean') return value === 'undefined' || value === undefined ? undefined : !!value;else if (this.schema.type === 'number') return 1 * value || 0;else if (this.schema.type === 'integer') return Math.floor(value * 1 || 0);else if (this.schema["enum"] && value === undefined) return undefined;
      return "".concat(value);
    }
  }, {
    key: "getValue",
    value: function getValue() {
      if (!this.dependenciesFulfilled) {
        return undefined;
      }

      return this.typecast(this.value);
    }
  }, {
    key: "preBuild",
    value: function preBuild() {
      var _this = this;

      this.input_type = 'select';
      this.enum_options = [];
      this.enum_values = [];
      this.enum_display = [];
      var i;
      var callback;
      /* Enum options enumerated */

      if (this.schema["enum"]) {
        var display = this.schema.options && this.schema.options.enum_titles || [];
        this.schema["enum"].forEach(function (option, i) {
          _this.enum_options[i] = "".concat(option);
          _this.enum_display[i] = "".concat(_this.translateProperty(display[i]) || option);
          _this.enum_values[i] = _this.typecast(option);
        });

        if (!this.isRequired()) {
          this.enum_display.unshift(' ');
          this.enum_options.unshift('undefined');
          this.enum_values.unshift(undefined);
        }
        /* Boolean */

      } else if (this.schema.type === 'boolean') {
        this.enum_display = this.schema.options && this.schema.options.enum_titles || ['true', 'false'];
        this.enum_options = ['1', ''];
        this.enum_values = [true, false];

        if (!this.isRequired()) {
          this.enum_display.unshift(' ');
          this.enum_options.unshift('undefined');
          this.enum_values.unshift(undefined);
        }
        /* Dynamic Enum */

      } else if (this.schema.enumSource) {
        this.enumSource = [];
        this.enum_display = [];
        this.enum_options = [];
        this.enum_values = [];
        /* Shortcut declaration for using a single array */

        if (!Array.isArray(this.schema.enumSource)) {
          if (this.schema.enumValue) {
            this.enumSource = [{
              source: this.schema.enumSource,
              value: this.schema.enumValue
            }];
          } else {
            this.enumSource = [{
              source: this.schema.enumSource
            }];
          }
        } else {
          for (i = 0; i < this.schema.enumSource.length; i++) {
            /* Shorthand for watched variable */
            if (typeof this.schema.enumSource[i] === 'string') {
              this.enumSource[i] = {
                source: this.schema.enumSource[i]
              };
              /* Make a copy of the schema */
            } else if (!Array.isArray(this.schema.enumSource[i])) {
              this.enumSource[i] = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_29__["extend"])({}, this.schema.enumSource[i]);
            } else {
              this.enumSource[i] = this.schema.enumSource[i];
            }
          }
        }
        /* Now, enumSource is an array of sources */

        /* Walk through this array and fix up the values */


        for (i = 0; i < this.enumSource.length; i++) {
          if (this.enumSource[i].value) {
            callback = this.expandCallbacks('template', {
              template: this.enumSource[i].value
            });
            if (typeof callback.template === 'function') this.enumSource[i].value = callback.template;else this.enumSource[i].value = this.jsoneditor.compileTemplate(this.enumSource[i].value, this.template_engine);
          }

          if (this.enumSource[i].title) {
            callback = this.expandCallbacks('template', {
              template: this.enumSource[i].title
            });
            if (typeof callback.template === 'function') this.enumSource[i].title = callback.template;else this.enumSource[i].title = this.jsoneditor.compileTemplate(this.enumSource[i].title, this.template_engine);
          }

          if (this.enumSource[i].filter && this.enumSource[i].value) {
            callback = this.expandCallbacks('template', {
              template: this.enumSource[i].filter
            });
            if (typeof callback.template === 'function') this.enumSource[i].filter = callback.template;else this.enumSource[i].filter = this.jsoneditor.compileTemplate(this.enumSource[i].filter, this.template_engine);
          }
        }
        /* Other, not supported */

      } else {
        throw new Error("'select' editor requires the enum property to be set.");
      }
    }
  }, {
    key: "build",
    value: function build() {
      var _this2 = this;

      if (!this.options.compact) this.header = this.label = this.theme.getFormInputLabel(this.getTitle(), this.isRequired());
      if (this.schema.description) this.description = this.theme.getFormInputDescription(this.translateProperty(this.schema.description));
      if (this.options.infoText) this.infoButton = this.theme.getInfoButton(this.translateProperty(this.options.infoText));
      if (this.options.compact) this.container.classList.add('compact');
      this.input = this.theme.getSelectInput(this.enum_options, false);
      this.theme.setSelectOptions(this.input, this.enum_options, this.enum_display);

      if (this.schema.readOnly || this.schema.readonly) {
        this.disable(true);
        this.input.disabled = true;
      }
      /* Set custom attributes on input element. Parameter is array of protected keys. Empty array if none. */


      this.setInputAttributes([]);
      this.input.addEventListener('change', function (e) {
        e.preventDefault();
        e.stopPropagation();

        _this2.onInputChange();
      });
      this.control = this.theme.getFormControl(this.label, this.input, this.description, this.infoButton);
      this.container.appendChild(this.control);
      this.value = this.enum_values[0];
      /* Any special formatting that needs to happen after the input is added to the dom */

      window.requestAnimationFrame(function () {
        if (_this2.input.parentNode) _this2.afterInputReady();
      });
    }
  }, {
    // Mahara customisation: this postBuild method has been added here as a work around for upgrading from 1.3.5 to 2.6.1. It overrides the default postBuild function for the select dropdowns.
    key: "postBuild",
    value: function postBuild() {
      // this.setupWatchListeners();
      this.addLinks();
      this.setValue(this.getDefault(), true);
      this.updateHeaderText();
      this.register();
      // this.onWatchedFieldChange();
    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady() {
      this.theme.afterInputReady(this.input);
    }
  }, {
    key: "onInputChange",
    value: function onInputChange() {
      var val = this.typecast(this.input.value);
      var newVal;
      /* Invalid option, use first option instead */

      if (!this.enum_values.includes(val)) {
        newVal = this.enum_values[0];
      } else {
        newVal = this.enum_values[this.enum_values.indexOf(val)];
      }
      /* If valid hasn't changed */


      if (newVal === this.value) return;
      this.is_dirty = true;
      /* Store new value and propogate change event */

      this.value = newVal;
      this.onChange(true);
    }
  }, {
    key: "onWatchedFieldChange",
    value: function onWatchedFieldChange() {
      var vars;
      var j;
      var selectOptions = [];
      var selectTitles = [];
      /* If this editor uses a dynamic select box */

      if (this.enumSource) {
        vars = this.getWatchedFieldValues();

        for (var i = 0; i < this.enumSource.length; i++) {
          /* Constant values */
          if (Array.isArray(this.enumSource[i])) {
            selectOptions = selectOptions.concat(this.enumSource[i]);
            selectTitles = selectTitles.concat(this.enumSource[i]);
          } else {
            var items = [];
            /* Static list of items */

            if (Array.isArray(this.enumSource[i].source)) {
              items = this.enumSource[i].source;
              /* A watched field */
            } else {
              items = vars[this.enumSource[i].source];
            }

            if (items) {
              /* Only use a predefined part of the array */
              if (this.enumSource[i].slice) {
                items = Array.prototype.slice.apply(items, this.enumSource[i].slice);
              }
              /* Filter the items */


              if (this.enumSource[i].filter) {
                var newItems = [];

                for (j = 0; j < items.length; j++) {
                  if (this.enumSource[i].filter({
                    i: j,
                    item: items[j],
                    watched: vars
                  })) newItems.push(items[j]);
                }

                items = newItems;
              }

              var itemTitles = [];
              var itemValues = [];

              for (j = 0; j < items.length; j++) {
                var item = items[j];
                /* Rendered value */

                if (this.enumSource[i].value) {
                  itemValues[j] = this.typecast(this.enumSource[i].value({
                    i: j,
                    item: item
                  }));
                  /* Use value directly */
                } else {
                  itemValues[j] = items[j];
                }
                /* Rendered title */


                if (this.enumSource[i].title) {
                  itemTitles[j] = this.enumSource[i].title({
                    i: j,
                    item: item
                  });
                  /* Use value as the title also */
                } else {
                  itemTitles[j] = itemValues[j];
                }
              }

              if (this.enumSource[i].sort) {
                (function (itemValues, itemTitles, order) {
                  itemValues.map(function (v, i) {
                    return {
                      v: v,
                      t: itemTitles[i]
                    };
                  }).sort(function (a, b) {
                    return a.v < b.v ? -order : a.v === b.v ? 0 : order;
                  }).forEach(function (v, i) {
                    itemValues[i] = v.v;
                    itemTitles[i] = v.t;
                  });
                }).bind(null, itemValues, itemTitles, this.enumSource[i].sort === 'desc' ? 1 : -1)();
              }

              selectOptions = selectOptions.concat(itemValues);
              selectTitles = selectTitles.concat(itemTitles);
            }
          }
        }

        var prevValue = this.value;
        this.theme.setSelectOptions(this.input, selectOptions, selectTitles);
        this.enum_options = selectOptions;
        this.enum_display = selectTitles;
        this.enum_values = selectOptions;
        /* If the previous value is still in the new select options */

        /* or if global option "enum_source_value_auto_select" is true, stick with it */

        if (selectOptions.includes(prevValue) || this.jsoneditor.options.enum_source_value_auto_select !== false) {
          this.input.value = prevValue;
          this.value = prevValue;
          /* Otherwise, set the value to the first select option */
        } else {
          this.input.value = selectOptions[0];
          this.value = this.typecast(selectOptions[0] || '');
          if (this.parent && !this.watchLoop) this.parent.onChildEditorChange(this);else this.jsoneditor.onChange();
          this.jsoneditor.notifyWatchers(this.path);
        }
      }

      _get(_getPrototypeOf(SelectEditor.prototype), "onWatchedFieldChange", this).call(this);
    }
  }, {
    key: "enable",
    value: function enable() {
      if (!this.always_disabled) {
        this.input.disabled = false;

        _get(_getPrototypeOf(SelectEditor.prototype), "enable", this).call(this);
      }
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      if (alwaysDisabled) this.always_disabled = true;
      this.input.disabled = true;

      _get(_getPrototypeOf(SelectEditor.prototype), "disable", this).call(this, alwaysDisabled);
    }
  }, {
    key: "destroy",
    value: function destroy() {
      if (this.label && this.label.parentNode) this.label.parentNode.removeChild(this.label);
      if (this.description && this.description.parentNode) this.description.parentNode.removeChild(this.description);
      if (this.input && this.input.parentNode) this.input.parentNode.removeChild(this.input);

      _get(_getPrototypeOf(SelectEditor.prototype), "destroy", this).call(this);
    }
  }, {
    key: "showValidationErrors",
    value: function showValidationErrors(errors) {
      var _this3 = this;

      this.previous_error_setting = this.jsoneditor.options.show_errors;

      var addMessage = function addMessage(messages, error) {
        if (error.path === _this3.path) {
          messages.push(error.message);
        }

        return messages;
      };

      var messages = errors.reduce(addMessage, []);

      if (messages.length) {
        this.theme.addInputError(this.input, "".concat(messages.join('. '), "."));
      } else {
        this.theme.removeInputError(this.input);
      }
    }
  }]);

  return SelectEditor;
}(_editor_js__WEBPACK_IMPORTED_MODULE_28__["AbstractEditor"]);

/***/ }),

/***/ "./src/editors/select2.js":
/*!********************************!*\
  !*** ./src/editors/select2.js ***!
  \********************************/
/*! exports provided: Select2Editor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Select2Editor", function() { return Select2Editor; });
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ "./node_modules/core-js/modules/es.string.includes.js");
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./select.js */ "./src/editors/select.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }


















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var Select2Editor = /*#__PURE__*/function (_SelectEditor) {
  _inherits(Select2Editor, _SelectEditor);

  var _super = _createSuper(Select2Editor);

  function Select2Editor() {
    _classCallCheck(this, Select2Editor);

    return _super.apply(this, arguments);
  }

  _createClass(Select2Editor, [{
    key: "setValue",
    value: function setValue(value, initial) {
      if (this.select2_instance) {
        if (initial) this.is_dirty = false;else if (this.jsoneditor.options.show_errors === 'change') this.is_dirty = true;
        var sanitized = this.updateValue(value);
        /* Sets this.value to sanitized value */

        this.input.value = sanitized;
        if (this.select2v4) this.select2_instance.val(sanitized).trigger('change');else this.select2_instance.select2('val', sanitized);
        this.onChange(true);
      } else _get(_getPrototypeOf(Select2Editor.prototype), "setValue", this).call(this, value, initial);
    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady() {
      var _this = this;

      if (window.jQuery && window.jQuery.fn && window.jQuery.fn.select2 && !this.select2_instance) {
        /* Get options, either global options from "this.defaults.options.select2" or */

        /* single property options from schema "options.select2" */
        var options = this.expandCallbacks('select2', Object(_utilities_js__WEBPACK_IMPORTED_MODULE_17__["extend"])({}, this.defaults.options.select2 || {}, this.options.select2 || {}));
        /* New items are allowed if option "tags" is true and type is "string" */

        this.newEnumAllowed = options.tags = !!options.tags && this.schema.type === 'string';
        this.select2_instance = window.jQuery(this.input).select2(options);
        this.select2v4 = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_17__["hasOwnProperty"])(this.select2_instance.select2, 'amd');
        /* Create change handler */

        this.selectChangeHandler = function () {
          var value = _this.select2v4 ? _this.select2_instance.val() : _this.select2_instance.select2('val');

          _this.updateValue(value);

          _this.onChange(true);
        };
        /* Add event handler. */

        /* Note: Must use the "on()" method and not addEventListener() */


        this.select2_instance.on('change', this.selectChangeHandler);
        this.select2_instance.on('select2-blur', this.selectChangeHandler);
      }

      _get(_getPrototypeOf(Select2Editor.prototype), "afterInputReady", this).call(this);
    }
  }, {
    key: "updateValue",
    value: function updateValue(value) {
      var sanitized = this.enum_values[0];
      value = this.typecast(value || '');

      if (!this.enum_values.includes(value)) {
        if (this.newEnumAllowed) {
          sanitized = this.addNewOption(value) ? value : sanitized;
        }
      } else sanitized = value;

      this.value = sanitized;
      return sanitized;
    }
  }, {
    key: "addNewOption",
    value: function addNewOption(value) {
      var sanitized = this.typecast(value);
      var res = false;
      var optionTag;

      if (!this.enum_values.includes(sanitized) && sanitized !== '') {
        /* Add to list of valid enum values */
        this.enum_options.push("".concat(sanitized));
        this.enum_display.push("".concat(sanitized));
        this.enum_values.push(sanitized);
        /* Update Schema enum to prevent triggering error */

        /* "Value must be one of the enumerated values" */

        this.schema["enum"].push(sanitized);
        optionTag = this.input.querySelector("option[value=\"".concat(sanitized, "\"]"));

        if (optionTag) {
          /* Remove data attribute to make option tag permanent. */
          optionTag.removeAttribute('data-select2-tag');
        } else {
          this.input.appendChild(new Option(sanitized, sanitized, false, false)).trigger('change');
        }

        res = true;
      }

      return res;
    }
  }, {
    key: "enable",
    value: function enable() {
      if (!this.always_disabled) {
        if (this.select2_instance) {
          if (this.select2v4) this.select2_instance.prop('disabled', false);else this.select2_instance.select2('enable', true);
        }
      }

      _get(_getPrototypeOf(Select2Editor.prototype), "enable", this).call(this);
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      if (this.select2_instance) {
        if (this.select2v4) this.select2_instance.prop('disabled', true);else this.select2_instance.select2('enable', false);
      }

      _get(_getPrototypeOf(Select2Editor.prototype), "disable", this).call(this, alwaysDisabled);
    }
  }, {
    key: "destroy",
    value: function destroy() {
      if (this.select2_instance) {
        this.select2_instance.select2('destroy');
        this.select2_instance = null;
      }

      _get(_getPrototypeOf(Select2Editor.prototype), "destroy", this).call(this);
    }
  }]);

  return Select2Editor;
}(_select_js__WEBPACK_IMPORTED_MODULE_16__["SelectEditor"]);

/***/ }),

/***/ "./src/editors/selectize.js":
/*!**********************************!*\
  !*** ./src/editors/selectize.js ***!
  \**********************************/
/*! exports provided: SelectizeEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectizeEditor", function() { return SelectizeEditor; });
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ "./node_modules/core-js/modules/es.string.includes.js");
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./select.js */ "./src/editors/select.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }




















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var SelectizeEditor = /*#__PURE__*/function (_SelectEditor) {
  _inherits(SelectizeEditor, _SelectEditor);

  var _super = _createSuper(SelectizeEditor);

  function SelectizeEditor() {
    _classCallCheck(this, SelectizeEditor);

    return _super.apply(this, arguments);
  }

  _createClass(SelectizeEditor, [{
    key: "setValue",
    value: function setValue(value, initial) {
      if (this.selectize_instance) {
        if (initial) this.is_dirty = false;else if (this.jsoneditor.options.show_errors === 'change') this.is_dirty = true;
        var sanitized = this.updateValue(value);
        /* Sets this.value to sanitized value */

        this.input.value = sanitized;
        this.selectize_instance.clear(true);
        this.selectize_instance.setValue(sanitized);
        this.onChange(true);
      } else _get(_getPrototypeOf(SelectizeEditor.prototype), "setValue", this).call(this, value, initial);
    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady() {
      var _this = this;

      if (window.jQuery && window.jQuery.fn && window.jQuery.fn.selectize && !this.selectize_instance) {
        /* Get options, either global options from "this.defaults.options.selectize" or */

        /* single property options from schema "options.selectize" */
        var options = this.expandCallbacks('selectize', Object(_utilities_js__WEBPACK_IMPORTED_MODULE_19__["extend"])({}, this.defaults.options.selectize || {}, this.options.selectize || {}));
        /* New items are allowed if option "create" is true and type is "string" */

        this.newEnumAllowed = options.create = !!options.create && this.schema.type === 'string';
        this.selectize_instance = window.jQuery(this.input).selectize(options)[0].selectize;
        /* Remove change handler set in parent class (src/multiselect.js) */

        this.control.removeEventListener('change', this.multiselectChangeHandler);
        /* Create a new change handler */

        this.multiselectChangeHandler = function (value) {
          /* var value = this.selectize_instance.getValue(true); */

          /* this.value = value; */
          _this.updateValue(value);

          _this.onChange(true);
        };
        /* Add new event handler. */

        /* Note: Must use the "on()" method and not addEventListener() */


        this.selectize_instance.on('change', this.multiselectChangeHandler);
      }

      _get(_getPrototypeOf(SelectizeEditor.prototype), "afterInputReady", this).call(this);
    }
  }, {
    key: "updateValue",
    value: function updateValue(value) {
      var sanitized = this.enum_values[0];
      value = this.typecast(value || '');

      if (!this.enum_values.includes(value)) {
        if (this.newEnumAllowed) {
          sanitized = this.addNewOption(value) ? value : sanitized;
        }
      } else sanitized = value;

      this.value = sanitized;
      return sanitized;
    }
  }, {
    key: "addNewOption",
    value: function addNewOption(value) {
      var sanitized = this.typecast(value);
      var res = false;

      if (!this.enum_values.includes(sanitized) && sanitized !== '') {
        /* Add to list of valid enum values */
        this.enum_options.push("".concat(sanitized));
        this.enum_display.push("".concat(sanitized));
        this.enum_values.push(sanitized);
        /* Update Schema enum to prevent triggering error */

        /* "Value must be one of the enumerated values" */

        this.schema["enum"].push(sanitized);
        /* Add selectize item */

        this.selectize_instance.addItem(sanitized);
        this.selectize_instance.refreshOptions(false);
        res = true;
      }

      return res;
    }
  }, {
    key: "onWatchedFieldChange",
    value: function onWatchedFieldChange() {
      var _this2 = this;

      _get(_getPrototypeOf(SelectizeEditor.prototype), "onWatchedFieldChange", this).call(this);

      if (this.selectize_instance) {
        this.selectize_instance.clear(true);
        /* Clear selection */

        this.selectize_instance.clearOptions(true);
        /* Remove all options */

        this.enum_options.forEach(function (value, i) {
          _this2.selectize_instance.addOption({
            value: value,
            text: _this2.enum_display[i]
          });
        });
        this.selectize_instance.addItem("".concat(this.value), true);
        /* Set new selection */
      }
    }
  }, {
    key: "enable",
    value: function enable() {
      if (!this.always_disabled && this.selectize_instance) this.selectize_instance.unlock();

      _get(_getPrototypeOf(SelectizeEditor.prototype), "enable", this).call(this);
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      if (this.selectize_instance) this.selectize_instance.lock();

      _get(_getPrototypeOf(SelectizeEditor.prototype), "disable", this).call(this, alwaysDisabled);
    }
  }, {
    key: "destroy",
    value: function destroy() {
      if (this.selectize_instance) {
        this.selectize_instance.destroy();
        this.selectize_instance = null;
      }

      _get(_getPrototypeOf(SelectizeEditor.prototype), "destroy", this).call(this);
    }
  }]);

  return SelectizeEditor;
}(_select_js__WEBPACK_IMPORTED_MODULE_18__["SelectEditor"]);

/***/ }),

/***/ "./src/editors/signature.js":
/*!**********************************!*\
  !*** ./src/editors/signature.js ***!
  \**********************************/
/*! exports provided: SignatureEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SignatureEditor", function() { return SignatureEditor; });
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.string.replace.js */ "./node_modules/core-js/modules/es.string.replace.js");
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js");
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./string.js */ "./src/editors/string.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }



















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); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

/* This editor is using the signature pad editor from https://github.com/szimek/signature_pad */

/* Credits for the pad itself go to https://github.com/szimek */

var SignatureEditor = /*#__PURE__*/function (_StringEditor) {
  _inherits(SignatureEditor, _StringEditor);

  var _super = _createSuper(SignatureEditor);

  function SignatureEditor() {
    _classCallCheck(this, SignatureEditor);

    return _super.apply(this, arguments);
  }

  _createClass(SignatureEditor, [{
    key: "build",
    value: function build() {
      var _this = this;

      if (!this.options.compact) this.header = this.label = this.theme.getFormInputLabel(this.getTitle(), this.isRequired());
      if (this.schema.description) this.description = this.theme.getFormInputDescription(this.translateProperty(this.schema.description));
      var formname = this.formname.replace(/\W/g, '');

      if (typeof SignaturePad === 'function') {
        /* Dynamically add the required CSS the first time this editor is used */
        this.input = this.theme.getFormInputField('hidden');
        this.container.appendChild(this.input);
        /* Required to keep height */

        var signatureContainer = document.createElement('div');
        signatureContainer.classList.add('signature-container');
        /* Create canvas for signature pad */

        var canvas = document.createElement('canvas');
        canvas.setAttribute('name', formname);
        canvas.classList.add('signature');
        signatureContainer.appendChild(canvas);
        this.signaturePad = new window.SignaturePad(canvas, {
          onEnd: function onEnd() {
            /* check if the signature is not empty before setting a value */
            if (!this.signaturePad.isEmpty()) {
              this.input.value = this.signaturePad.toDataURL();
            } else {
              this.input.value = '';
            }

            this.is_dirty = true;
            this.refreshValue();
            this.watch_listener();
            this.jsoneditor.notifyWatchers(this.path);
            if (this.parent) this.parent.onChildEditorChange(this);else this.jsoneditor.onChange();
          }
        });
        /* create button containers and add clear signature button */

        var buttons = document.createElement('div');
        var clearButton = document.createElement('button');
        clearButton.classList.add('tiny', 'button');
        clearButton.innerHTML = 'Clear signature';
        buttons.appendChild(clearButton);
        signatureContainer.appendChild(buttons);
        if (this.options.compact) this.container.setAttribute('class', "".concat(this.container.getAttribute('class'), " compact"));

        if (this.schema.readOnly || this.schema.readonly) {
          this.disable(true);
          Array.from(this.inputs).forEach(function (input) {
            canvas.setAttribute('readOnly', 'readOnly');
            input.disabled = true;
          });
        }
        /* add listener to the clear button. when clicked, trigger a canvas change after emptying the canvas */


        clearButton.addEventListener('click', function (e) {
          e.preventDefault();
          e.stopPropagation();

          _this.signaturePad.clear();
          /* trigger stroke end to let signaturePad update the dataURL */


          _this.signaturePad.strokeEnd();
        });
        this.control = this.theme.getFormControl(this.label, signatureContainer, this.description);
        this.container.appendChild(this.control);
        this.refreshValue();
        /* signature canvas will stretch to signatureContainer width */

        canvas.width = signatureContainer.offsetWidth;

        if (this.options && this.options.canvas_height) {
          canvas.height = this.options.canvas_height;
        } else {
          canvas.height = '300';
          /* Set to default height of 300px; */
        }
      } else {
        var message = document.createElement('p');
        message.innerHTML = 'Signature pad is not available, please include SignaturePad from https://github.com/szimek/signature_pad';
        this.container.appendChild(message);
      }
    }
  }, {
    key: "setValue",
    value: function setValue(val) {
      if (typeof SignaturePad === 'function') {
        var sanitized = this.sanitize(val);

        if (this.value === sanitized) {
          return;
        }

        this.value = sanitized;
        this.input.value = this.value;
        this.signaturePad.clear();
        /* only set contents if value != '' */

        if (val && val !== '') {
          this.signaturePad.fromDataURL(val);
        }

        this.watch_listener();
        this.jsoneditor.notifyWatchers(this.path);
        return false;
      }
    }
  }, {
    key: "destroy",
    value: function destroy() {
      this.signaturePad.off();
      delete this.signaturePad;
    }
  }]);

  return SignatureEditor;
}(_string_js__WEBPACK_IMPORTED_MODULE_17__["StringEditor"]);

/***/ }),

/***/ "./src/editors/simplemde.js":
/*!**********************************!*\
  !*** ./src/editors/simplemde.js ***!
  \**********************************/
/*! exports provided: SimplemdeEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimplemdeEditor", function() { return SimplemdeEditor; });
/* harmony import */ var core_js_modules_web_timers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/web.timers.js */ "./node_modules/core-js/modules/web.timers.js");
/* harmony import */ var core_js_modules_web_timers_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_timers_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./string.js */ "./src/editors/string.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var SimplemdeEditor = /*#__PURE__*/function (_StringEditor) {
  _inherits(SimplemdeEditor, _StringEditor);

  var _super = _createSuper(SimplemdeEditor);

  function SimplemdeEditor() {
    _classCallCheck(this, SimplemdeEditor);

    return _super.apply(this, arguments);
  }

  _createClass(SimplemdeEditor, [{
    key: "setValue",
    value: function setValue(value, initial, fromTemplate) {
      var res = _get(_getPrototypeOf(SimplemdeEditor.prototype), "setValue", this).call(this, value, initial, fromTemplate);

      if (res !== undefined && res.changed && this.simplemde_instance) this.simplemde_instance.value(res.value);
    }
  }, {
    key: "build",
    value: function build() {
      this.options.format = 'textarea';
      /* Force format into "textarea" */

      _get(_getPrototypeOf(SimplemdeEditor.prototype), "build", this).call(this);

      this.input_type = this.schema.format;
      /* Restore original format */

      this.input.setAttribute('data-schemaformat', this.input_type);
    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady() {
      var _this = this;

      var options;

      if (window.SimpleMDE) {
        /* Get options, either global options from "this.defaults.options.simplemde" or */

        /* single property options from schema "options.simplemde" */
        options = this.expandCallbacks('simplemde', Object(_utilities_js__WEBPACK_IMPORTED_MODULE_16__["extend"])({}, {
          height: 300
        }, this.defaults.options.simplemde || {}, this.options.simplemde || {}, {
          element: this.input
        }));
        this.simplemde_instance = new window.SimpleMDE(options);

        if (this.schema.readOnly || this.schema.readonly || this.schema.template) {
          this.simplemde_instance.codemirror.options.readOnly = true;
        }
        /* Listen for changes */


        this.simplemde_instance.codemirror.on('change', function () {
          _this.value = _this.simplemde_instance.value();
          _this.is_dirty = true;

          _this.onChange(true);
        });
        /* This will prevent SimpleMDE content from being hidden until focus in Chrome */

        /* if SimpleMDE is not visible (Like when placed inside Tabs) */

        if (options.autorefresh) {
          this.startListening(this.simplemde_instance.codemirror, this.simplemde_instance.codemirror.state.autoRefresh = {
            delay: 250
          });
        }

        this.theme.afterInputReady(this.input);
      } else _get(_getPrototypeOf(SimplemdeEditor.prototype), "afterInputReady", this).call(this);
      /* Library not loaded, so just treat this as a string */

    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      return 6;
    }
  }, {
    key: "enable",
    value: function enable() {
      if (!this.always_disabled && this.simplemde_instance) this.simplemde_instance.codemirror.options.readOnly = false;

      _get(_getPrototypeOf(SimplemdeEditor.prototype), "enable", this).call(this);
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      if (this.simplemde_instance) this.simplemde_instance.codemirror.options.readOnly = true;

      _get(_getPrototypeOf(SimplemdeEditor.prototype), "disable", this).call(this, alwaysDisabled);
    }
  }, {
    key: "destroy",
    value: function destroy() {
      if (this.simplemde_instance) {
        this.simplemde_instance.toTextArea();
        this.simplemde_instance = null;
      }

      _get(_getPrototypeOf(SimplemdeEditor.prototype), "destroy", this).call(this);
    }
    /* Ported from https://codemirror.net/addon/display/autorefresh.js */

  }, {
    key: "startListening",
    value: function startListening(cm, state) {
      function check() {
        if (cm.display.wrapper.offsetHeight) {
          this.stopListening(cm, state);

          if (cm.display.lastWrapHeight !== cm.display.wrapper.clientHeight) {
            cm.refresh();
          }
        } else {
          state.timeout = window.setTimeout(check, state.delay);
        }
      }

      state.timeout = window.setTimeout(check, state.delay);

      state.hurry = function () {
        window.clearTimeout(state.timeout);
        state.timeout = window.setTimeout(check, 50);
      };

      cm.on(window, 'mouseup', state.hurry);
      cm.on(window, 'keyup', state.hurry);
    }
  }, {
    key: "stopListening",
    value: function stopListening(cm, state) {
      window.clearTimeout(state.timeout);
      cm.off(window, 'mouseup', state.hurry);
      cm.off(window, 'keyup', state.hurry);
    }
  }]);

  return SimplemdeEditor;
}(_string_js__WEBPACK_IMPORTED_MODULE_15__["StringEditor"]);

/***/ }),

/***/ "./src/editors/starrating.css.js":
/*!***************************************!*\
  !*** ./src/editors/starrating.css.js ***!
  \***************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* eslint-disable */
/* harmony default export */ __webpack_exports__["default"] = ({
  ".starrating": "direction:rtl;display:inline-block;white-space:nowrap",
  ".starrating > input": "display:none",
  ".starrating > label:before": "content:'%5C2606';margin:1px;font-size:18px;font-style:normal;font-weight:400;line-height:1;font-family:'Arial';display:inline-block",
  ".starrating > label": "color:%23888;cursor:pointer;margin:8px%200%202px%200",
  ".starrating > label.starrating-display-enabled": "margin:1px%200%200%200",
  ".starrating > input:checked ~ label": "color:%23ffca08",
  ".starrating:not(.readonly) > input:hover ~ label": "color:%23ffca08",
  ".starrating > input:checked ~ label:before": "content:'%5C2605';text-shadow:0%200%201px%20rgba(0%2C20%2C20%2C1)",
  ".starrating:not(.readonly) > input:hover ~ label:before": "content:'%5C2605';text-shadow:0%200%201px%20rgba(0%2C20%2C20%2C1)",
  ".starrating .starrating-display": "position:relative;direction:rtl;text-align:center;font-size:10px;line-height:0px"
});
/* eslint-enable */

/***/ }),

/***/ "./src/editors/starrating.js":
/*!***********************************!*\
  !*** ./src/editors/starrating.js ***!
  \***********************************/
/*! exports provided: StarratingEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StarratingEditor", function() { return StarratingEditor; });
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./string.js */ "./src/editors/string.js");
/* harmony import */ var _starrating_css_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./starrating.css.js */ "./src/editors/starrating.css.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var StarratingEditor = /*#__PURE__*/function (_StringEditor) {
  _inherits(StarratingEditor, _StringEditor);

  var _super = _createSuper(StarratingEditor);

  function StarratingEditor() {
    _classCallCheck(this, StarratingEditor);

    return _super.apply(this, arguments);
  }

  _createClass(StarratingEditor, [{
    key: "build",
    value: function build() {
      var _this = this;

      if (!this.options.compact) this.header = this.label = this.theme.getFormInputLabel(this.getTitle(), this.isRequired());
      if (this.schema.description) this.description = this.theme.getFormInputDescription(this.translateProperty(this.schema.description));
      if (this.options.infoText) this.infoButton = this.theme.getInfoButton(this.translateProperty(this.options.infoText));
      if (this.options.compact) this.container.classList.add('compact');
      this.ratingContainer = document.createElement('div');
      this.ratingContainer.classList.add('starrating');
      /* Emulate the old "rating" editor parameters */

      if (this.schema["enum"] === undefined) {
        var max = this.schema.maximum ? this.schema.maximum : 5;
        if (this.schema.exclusiveMaximum) max--;
        this.enum_values = [];

        for (var k = 0; k < max; k++) {
          this.enum_values.push(k + 1);
        }
      } else this.enum_values = this.schema["enum"];

      this.radioGroup = [];

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

        _this.setValue(e.currentTarget.value);

        _this.onChange(true);
      };

      for (var i = this.enum_values.length - 1; i > -1; i--) {
        var id = this.formname + (i + 1);
        /* form radio elements */

        var radioInput = this.theme.getFormInputField('radio');
        radioInput.name = "".concat(this.formname, "[starrating]");
        radioInput.value = this.enum_values[i];
        radioInput.id = id;
        radioInput.addEventListener('change', radioInputEventhandler, false);
        this.radioGroup.push(radioInput);
        /* form-label for radio elements */

        var radioLabel = document.createElement('label');
        radioLabel.htmlFor = id;
        radioLabel.title = this.enum_values[i];

        if (this.options.displayValue) {
          radioLabel.classList.add('starrating-display-enabled');
        }

        this.ratingContainer.appendChild(radioInput);
        this.ratingContainer.appendChild(radioLabel);
      }

      if (this.options.displayValue) {
        this.displayRating = document.createElement('div');
        this.displayRating.classList.add('starrating-display');
        this.displayRating.innerText = this.enum_values[0];
        this.ratingContainer.appendChild(this.displayRating);
      }

      if (this.schema.readOnly || this.schema.readonly) {
        this.disable(true);

        for (var j = 0; j < this.radioGroup.length; j++) {
          this.radioGroup[j].disabled = true;
        }

        this.ratingContainer.classList.add('readonly');
      }

      var ratingsContainerWrapper = this.theme.getContainer();
      ratingsContainerWrapper.appendChild(this.ratingContainer);
      this.input = ratingsContainerWrapper;
      this.control = this.theme.getFormControl(this.label, ratingsContainerWrapper, this.description, this.infoButton);
      this.container.appendChild(this.control);
      this.refreshValue();
    }
  }, {
    key: "enable",
    value: function enable() {
      if (!this.always_disabled) {
        for (var i = 0; i < this.radioGroup.length; i++) {
          this.radioGroup[i].disabled = false;
        }

        this.ratingContainer.classList.remove('readonly');
        this.disabled = false;
      }
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      if (alwaysDisabled) this.always_disabled = true;

      for (var i = 0; i < this.radioGroup.length; i++) {
        this.radioGroup[i].disabled = true;
      }

      this.ratingContainer.classList.add('readonly');
      this.disabled = true;
    }
  }, {
    key: "destroy",
    value: function destroy() {
      if (this.ratingContainer.parentNode && this.ratingContainer.parentNode.parentNode) this.ratingContainer.parentNode.parentNode.removeChild(this.ratingContainer.parentNode);
      if (this.label && this.label.parentNode) this.label.parentNode.removeChild(this.label);
      if (this.description && this.description.parentNode) this.description.parentNode.removeChild(this.description);

      _get(_getPrototypeOf(StarratingEditor.prototype), "destroy", this).call(this);
    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      return 2;
    }
  }, {
    key: "getValue",
    value: function getValue() {
      if (!this.dependenciesFulfilled) {
        return undefined;
      }

      if (this.schema.type === 'integer') {
        return this.value === '' ? undefined : this.value * 1;
      }

      return this.value;
    }
  }, {
    key: "setValue",
    value: function setValue(value) {
      for (var i = 0; i < this.radioGroup.length; i++) {
        if (this.radioGroup[i].value === "".concat(value)) {
          this.radioGroup[i].checked = true;
          this.value = value;
          if (this.options.displayValue) this.displayRating.innerHTML = this.value;
          this.onChange(true);
          break;
        }
      }
    }
  }]);

  return StarratingEditor;
}(_string_js__WEBPACK_IMPORTED_MODULE_15__["StringEditor"]);
StarratingEditor.rules = _starrating_css_js__WEBPACK_IMPORTED_MODULE_16__["default"];

/***/ }),

/***/ "./src/editors/stepper.js":
/*!********************************!*\
  !*** ./src/editors/stepper.js ***!
  \********************************/
/*! exports provided: StepperEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StepperEditor", function() { return StepperEditor; });
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var _integer_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./integer.js */ "./src/editors/integer.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }


var StepperEditor = /*#__PURE__*/function (_IntegerEditor) {
  _inherits(StepperEditor, _IntegerEditor);

  var _super = _createSuper(StepperEditor);

  function StepperEditor() {
    _classCallCheck(this, StepperEditor);

    return _super.apply(this, arguments);
  }

  _createClass(StepperEditor, [{
    key: "build",
    value: function build() {
      _get(_getPrototypeOf(StepperEditor.prototype), "build", this).call(this);

      this.input.setAttribute('type', 'number');

      if (!this.input.getAttribute('step')) {
        this.input.setAttribute('step', '1');
      }

      var stepperButtons = this.theme.getStepperButtons(this.input);
      this.control.appendChild(stepperButtons);
      this.stepperDown = this.control.querySelector('.stepper-down');
      this.stepperUp = this.control.querySelector('.stepper-up');
    }
  }, {
    key: "enable",
    value: function enable() {
      _get(_getPrototypeOf(StepperEditor.prototype), "enable", this).call(this);

      this.stepperDown.removeAttribute('disabled');
      this.stepperUp.removeAttribute('disabled');
    }
  }, {
    key: "disable",
    value: function disable() {
      _get(_getPrototypeOf(StepperEditor.prototype), "disable", this).call(this);

      this.stepperDown.setAttribute('disabled', true);
      this.stepperUp.setAttribute('disabled', true);
    }
  }]);

  return StepperEditor;
}(_integer_js__WEBPACK_IMPORTED_MODULE_14__["IntegerEditor"]);

/***/ }),

/***/ "./src/editors/string.js":
/*!*******************************!*\
  !*** ./src/editors/string.js ***!
  \*******************************/
/*! exports provided: StringEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StringEditor", function() { return StringEditor; });
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.string.replace.js */ "./node_modules/core-js/modules/es.string.replace.js");
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.string.match.js */ "./node_modules/core-js/modules/es.string.match.js");
/* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ "./node_modules/core-js/modules/es.regexp.constructor.js");
/* harmony import */ var core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ "./node_modules/core-js/modules/es.regexp.to-string.js");
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ "./node_modules/core-js/modules/es.string.includes.js");
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.string.split.js */ "./node_modules/core-js/modules/es.string.split.js");
/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.array.reduce.js */ "./node_modules/core-js/modules/es.array.reduce.js");
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.array.join.js */ "./node_modules/core-js/modules/es.array.join.js");
/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_19__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_20__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_21__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_22__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_23__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_24__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_25__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_26__);
/* harmony import */ var _editor_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../editor.js */ "./src/editor.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");




























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

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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var StringEditor = /*#__PURE__*/function (_AbstractEditor) {
  _inherits(StringEditor, _AbstractEditor);

  var _super = _createSuper(StringEditor);

  function StringEditor() {
    _classCallCheck(this, StringEditor);

    return _super.apply(this, arguments);
  }

  _createClass(StringEditor, [{
    key: "register",
    value: function register() {
      _get(_getPrototypeOf(StringEditor.prototype), "register", this).call(this);

      if (!this.input) return;
      this.input.setAttribute('name', this.formname);
      this.input.setAttribute('aria-label', this.formname);
    }
  }, {
    key: "unregister",
    value: function unregister() {
      _get(_getPrototypeOf(StringEditor.prototype), "unregister", this).call(this);

      if (!this.input) return;
      this.input.removeAttribute('name');
      this.input.removeAttribute('aria-label');
    }
  }, {
    key: "setValue",
    value: function setValue(value, initial, fromTemplate) {
      if (this.template && !fromTemplate) return;
      if (!this.shouldBeUnset() && (value === null || typeof value === 'undefined')) value = '';else if (_typeof(value) === 'object') value = JSON.stringify(value);else if (!this.shouldBeUnset() && typeof value !== 'string') value = "".concat(value);
      if (value === this.serialized) return;
      /* Sanitize value before setting it */

      var sanitized = this.sanitize(value);
      if (this.input.value === sanitized) return;
      this.setValueToInputField(sanitized);

      if (this.format === 'range') {
        var output = this.control.querySelector('output');

        if (output) {
          output.value = sanitized;
        }
      }

      var changed = fromTemplate || this.getValue() !== value;
      this.refreshValue();
      if (initial) this.is_dirty = false;else if (this.jsoneditor.options.show_errors === 'change') this.is_dirty = true;
      if (this.adjust_height) this.adjust_height(this.input);
      /* Bubble this setValue to parents if the value changed */

      this.onChange(changed);
      /* Return object with changed state and sanitized value for use in editors that extend this */

      return {
        changed: changed,
        value: sanitized
      };
    }
  }, {
    key: "setValueToInputField",
    value: function setValueToInputField(value) {
      this.input.value = value === undefined ? '' : value;
    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      var min = Math.ceil(Math.max(this.getTitle().length, this.schema.maxLength || 0, this.schema.minLength || 0) / 5);
      var num;
      if (this.input_type === 'textarea') num = 6;else if (['text', 'email'].includes(this.input_type)) num = 4;else num = 2;
      return Math.min(12, Math.max(min, num));
    }
  }, {
    key: "build",
    value: function build() {
      var _this = this;

      if (!this.options.compact) this.header = this.label = this.theme.getFormInputLabel(this.getTitle(), this.isRequired());
      if (this.schema.description) this.description = this.theme.getFormInputDescription(this.translateProperty(this.schema.description));
      if (this.options.infoText) this.infoButton = this.theme.getInfoButton(this.translateProperty(this.options.infoText));
      this.format = this.schema.format;

      if (!this.format && this.schema.media && this.schema.media.type) {
        this.format = this.schema.media.type.replace(/(^(application|text)\/(x-)?(script\.)?)|(-source$)/g, '');
      }

      if (!this.format && this.options.default_format) {
        this.format = this.options.default_format;
      }

      if (this.options.format) {
        this.format = this.options.format;
      }
      /* Specific format */


      if (this.format) {
        /* Text Area */
        if (this.format === 'textarea') {
          this.input_type = 'textarea';
          this.input = this.theme.getTextareaInput();
          /* Range Input */
        } else if (this.format === 'range') {
          this.input_type = 'range';
          var min = this.schema.minimum || 0;
          var max = this.schema.maximum || Math.max(100, min + 1);
          var step = 1;

          if (this.schema.multipleOf) {
            if (min % this.schema.multipleOf) min = Math.ceil(min / this.schema.multipleOf) * this.schema.multipleOf;
            if (max % this.schema.multipleOf) max = Math.floor(max / this.schema.multipleOf) * this.schema.multipleOf;
            step = this.schema.multipleOf;
          }

          this.input = this.theme.getRangeInput(min, max, step);
          /* HTML5 Input type */
        } else {
          this.input_type = 'text';

          if (['button', 'checkbox', 'color', 'date', 'datetime-local', 'email', 'file', 'hidden', 'image', 'month', 'number', 'password', 'radio', 'reset', 'search', 'submit', 'tel', 'text', 'time', 'url', 'week'].includes(this.format)) {
            this.input_type = this.format;
          }

          this.input = this.theme.getFormInputField(this.input_type);
        }
        /* Normal text input */

      } else {
        this.input_type = 'text';
        this.input = this.theme.getFormInputField(this.input_type);
      }
      /* minLength, maxLength, and pattern */


      if (typeof this.schema.maxLength !== 'undefined') this.input.setAttribute('maxlength', this.schema.maxLength);
      if (typeof this.schema.pattern !== 'undefined') this.input.setAttribute('pattern', this.schema.pattern);else if (typeof this.schema.minLength !== 'undefined') this.input.setAttribute('pattern', ".{".concat(this.schema.minLength, ",}"));

      if (this.options.compact) {
        this.container.classList.add('compact');
      } else if (this.options.input_width) this.input.style.width = this.options.input_width;

      if (this.schema.readOnly || this.schema.readonly || this.schema.template) {
        this.disable(true);
        this.input.setAttribute('readonly', 'true');
      }
      /* Set custom attributes on input element. Parameter is array of protected keys. Empty array if none. */


      this.setInputAttributes(['maxlength', 'pattern', 'readonly', 'min', 'max', 'step']);
      this.input.addEventListener('change', function (e) {
        e.preventDefault();
        e.stopPropagation();
        /* Don't allow changing if this field is a template */

        if (_this.schema.template) {
          e.currentTarget.value = _this.value;
          return;
        }

        var val = e.currentTarget.value;
        /* sanitize value */

        var sanitized = _this.sanitize(val);

        if (val !== sanitized) {
          e.currentTarget.value = sanitized;
        }

        _this.is_dirty = true;

        _this.refreshValue();

        _this.onChange(true);
      });
      if (this.options.input_height) this.input.style.height = this.options.input_height;

      if (this.options.expand_height) {
        this.adjust_height = function (el) {
          if (!el) return;
          var i;
          var ch = el.offsetHeight;
          /* Input too short */

          if (el.offsetHeight < el.scrollHeight) {
            i = 0;

            while (el.offsetHeight < el.scrollHeight + 3) {
              if (i > 100) break;
              i++;
              ch++;
              el.style.height = "".concat(ch, "px");
            }
          } else {
            i = 0;

            while (el.offsetHeight >= el.scrollHeight + 3) {
              if (i > 100) break;
              i++;
              ch--;
              el.style.height = "".concat(ch, "px");
            }

            el.style.height = "".concat(ch + 1, "px");
          }
        };

        this.input.addEventListener('keyup', function (e) {
          _this.adjust_height(e.currentTarget);
        });
        this.input.addEventListener('change', function (e) {
          _this.adjust_height(e.currentTarget);
        });
        this.adjust_height();
      }

      if (this.format) this.input.setAttribute('data-schemaformat', this.format);
      var input = this.input;

      if (this.format === 'range') {
        input = this.theme.getRangeControl(this.input, this.theme.getRangeOutput(this.input, this.schema["default"] || Math.max(this.schema.minimum || 0, 0)));
      }

      this.control = this.theme.getFormControl(this.label, input, this.description, this.infoButton, this.formname);
      this.container.appendChild(this.control);
      /* Any special formatting that needs to happen after the input is added to the dom */

      window.requestAnimationFrame(function () {
        /* Skip in case the input is only a temporary editor, */

        /* otherwise, in the case of an ace_editor creation, */

        /* it will generate an error trying to append it to the missing parentNode */
        if (_this.input.parentNode) _this.afterInputReady();
        if (_this.adjust_height) _this.adjust_height(_this.input);
      });
      /* Compile and store the template */

      if (this.schema.template) {
        var callback = this.expandCallbacks('template', {
          template: this.schema.template
        });
        if (typeof callback.template === 'function') this.template = callback.template;else this.template = this.jsoneditor.compileTemplate(this.schema.template, this.template_engine);
        this.refreshValue();
      } else {
        this.refreshValue();
      }
    }
  }, {
    key: "setupCleave",
    value: function setupCleave(el) {
      /* Enable cleave.js support if library is loaded and config is available */
      var options = this.expandCallbacks('cleave', Object(_utilities_js__WEBPACK_IMPORTED_MODULE_28__["extend"])({}, this.defaults.options.cleave || {}, this.options.cleave || {}));

      if (_typeof(options) === 'object' && Object.keys(options).length > 0) {
        this.cleave_instance = new window.Cleave(el, options);
      }
    }
  }, {
    key: "setupImask",
    value: function setupImask(el) {
      /* Enable imask.js support if library is loaded and config is available */
      var options = this.expandCallbacks('imask', Object(_utilities_js__WEBPACK_IMPORTED_MODULE_28__["extend"])({}, this.defaults.options.imask || {}, this.options.imask || {}));

      if (_typeof(options) === 'object' && Object.keys(options).length > 0) {
        this.imask_instance = window.IMask(el, this.ajustIMaskOptions(options));
      }
    }
  }, {
    key: "ajustIMaskOptions",
    value: function ajustIMaskOptions(obj) {
      var _this2 = this;

      /* iMask config format is not JSON friendly, so function and regex based mask */

      /* properties have to be adjusted from string to the correct format */
      Object.keys(obj).forEach(function (prop) {
        if (obj[prop] === Object(obj[prop])) obj[prop] = _this2.ajustIMaskOptions(obj[prop]);else if (prop === 'mask') {
          if (obj[prop].substr(0, 6) === 'regex:') {
            var regExMatch = obj[prop].match(/^regex:\/(.*)\/([gimsuy]*)$/);

            if (regExMatch !== null) {
              try {
                obj[prop] = new RegExp(regExMatch[1], regExMatch[2]);
              } catch (e) {}
            }
          } else obj[prop] = _this2.getGlobalPropertyFromString(obj[prop]);
        }
      });
      return obj;
    }
  }, {
    key: "getGlobalPropertyFromString",
    value: function getGlobalPropertyFromString(strValue) {
      if (!strValue.includes('.')) {
        if (typeof window[strValue] !== 'undefined') {
          return window[strValue];
        }
      } else {
        var arrParts = strValue.split('.');
        var obj = arrParts[0];
        var prop = arrParts[1];

        if (typeof window[obj] !== 'undefined' && typeof window[obj][prop] !== 'undefined') {
          return window[obj][prop];
        }
      }
      /* just a string */


      return strValue;
    }
  }, {
    key: "shouldBeUnset",
    value: function shouldBeUnset() {
      return !this.jsoneditor.options.use_default_values && !this.is_dirty;
    }
  }, {
    key: "getValue",
    value: function getValue() {
      var hasValueSet = !!(this.input && this.input.value);

      if (this.shouldBeUnset() && !hasValueSet) {
        return undefined;
      }

      if (this.imask_instance && this.dependenciesFulfilled && this.options.imask.returnUnmasked) {
        return this.imask_instance.unmaskedValue;
      }

      return _get(_getPrototypeOf(StringEditor.prototype), "getValue", this).call(this);
    }
  }, {
    key: "enable",
    value: function enable() {
      if (!this.always_disabled) {
        this.input.disabled = false;

        _get(_getPrototypeOf(StringEditor.prototype), "enable", this).call(this);
      }
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      if (alwaysDisabled) this.always_disabled = true;
      this.input.disabled = true;

      _get(_getPrototypeOf(StringEditor.prototype), "disable", this).call(this);
    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady() {
      this.theme.afterInputReady(this.input);
      if (window.Cleave && !this.cleave_instance) this.setupCleave(this.input);else if (window.IMask && !this.imask_instance) this.setupImask(this.input);
    }
  }, {
    key: "refreshValue",
    value: function refreshValue() {
      this.value = this.input.value;
      if (typeof this.value !== 'string' && !this.shouldBeUnset()) this.value = '';
      this.serialized = this.value;
    }
  }, {
    key: "destroy",
    value: function destroy() {
      if (this.cleave_instance) this.cleave_instance.destroy();
      if (this.imask_instance) this.imask_instance.destroy();
      this.template = null;
      if (this.input && this.input.parentNode) this.input.parentNode.removeChild(this.input);
      if (this.label && this.label.parentNode) this.label.parentNode.removeChild(this.label);
      if (this.description && this.description.parentNode) this.description.parentNode.removeChild(this.description);

      _get(_getPrototypeOf(StringEditor.prototype), "destroy", this).call(this);
    }
    /**
     * This is overridden in derivative editors
     */

  }, {
    key: "sanitize",
    value: function sanitize(value) {
      return value;
    }
    /**
     * Re-calculates the value if needed
     */

  }, {
    key: "onWatchedFieldChange",
    value: function onWatchedFieldChange() {
      var vars;
      /* If this editor needs to be rendered by a macro template */

      if (this.template) {
        vars = this.getWatchedFieldValues();
        this.setValue(this.template(vars), false, true);
      }

      _get(_getPrototypeOf(StringEditor.prototype), "onWatchedFieldChange", this).call(this);
    }
  }, {
    key: "showValidationErrors",
    value: function showValidationErrors(errors) {
      var _this3 = this;

      if (this.jsoneditor.options.show_errors === 'always') {} else if (!this.is_dirty && this.previous_error_setting === this.jsoneditor.options.show_errors) return;

      this.previous_error_setting = this.jsoneditor.options.show_errors;

      var addMessage = function addMessage(messages, error) {
        if (error.path === _this3.path) {
          messages.push(error.message);
        }

        return messages;
      };

      var messages = errors.reduce(addMessage, []);

      if (messages.length) {
        this.theme.addInputError(this.input, "".concat(messages.join('. '), "."));
      } else {
        this.theme.removeInputError(this.input);
      }
    }
  }]);

  return StringEditor;
}(_editor_js__WEBPACK_IMPORTED_MODULE_27__["AbstractEditor"]);

/***/ }),

/***/ "./src/editors/table.js":
/*!******************************!*\
  !*** ./src/editors/table.js ***!
  \******************************/
/*! exports provided: TableEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TableEditor", function() { return TableEditor; });
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ "./node_modules/core-js/modules/es.array.is-array.js");
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_array_some_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.some.js */ "./node_modules/core-js/modules/es.array.some.js");
/* harmony import */ var core_js_modules_es_array_some_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_some_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.array.splice.js */ "./node_modules/core-js/modules/es.array.splice.js");
/* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_19__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_20__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_21__);
/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./array.js */ "./src/editors/array.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
























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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var TableEditor = /*#__PURE__*/function (_ArrayEditor) {
  _inherits(TableEditor, _ArrayEditor);

  var _super = _createSuper(TableEditor);

  function TableEditor() {
    _classCallCheck(this, TableEditor);

    return _super.apply(this, arguments);
  }

  _createClass(TableEditor, [{
    key: "register",
    value: function register() {
      _get(_getPrototypeOf(TableEditor.prototype), "register", this).call(this);

      if (this.rows) {
        for (var i = 0; i < this.rows.length; i++) {
          this.rows[i].register();
        }
      }
    }
  }, {
    key: "unregister",
    value: function unregister() {
      _get(_getPrototypeOf(TableEditor.prototype), "unregister", this).call(this);

      if (this.rows) {
        for (var i = 0; i < this.rows.length; i++) {
          this.rows[i].unregister();
        }
      }
    }
  }, {
    key: "getNumColumns",
    value: function getNumColumns() {
      return Math.max(Math.min(12, this.width), 3);
    }
  }, {
    key: "preBuild",
    value: function preBuild() {
      var itemSchema = this.jsoneditor.expandRefs(this.schema.items || {});
      this.item_title = itemSchema.title || 'row';
      this.item_default = itemSchema["default"] || null;
      this.item_has_child_editors = itemSchema.properties || itemSchema.items;
      this.width = 12;
      this.array_controls_top = this.options.array_controls_top || this.jsoneditor.options.array_controls_top;

      _get(_getPrototypeOf(TableEditor.prototype), "preBuild", this).call(this);
    }
  }, {
    key: "build",
    value: function build() {
      this.table = this.theme.getTable();
      this.container.appendChild(this.table);
      this.thead = this.theme.getTableHead();
      this.table.appendChild(this.thead);
      this.header_row = this.theme.getTableRow();
      this.thead.appendChild(this.header_row);
      this.row_holder = this.theme.getTableBody();
      this.table.appendChild(this.row_holder);
      /* Determine the default value of array element */

      var tmp = this.getElementEditor(0, true);
      this.item_default = tmp.getDefault();
      this.width = tmp.getNumColumns() + 2;

      if (!this.options.compact) {
        // this.header = document.createElement('label');
        this.header = document.createElement('span');
        this.header.textContent = this.getTitle();
        this.title = this.theme.getHeader(this.header, this.getPathDepth());
        this.container.appendChild(this.title);

        if (this.options.infoText) {
          this.infoButton = this.theme.getInfoButton(this.translateProperty(this.options.infoText));
          this.container.appendChild(this.infoButton);
        }

        this.title_controls = this.theme.getHeaderButtonHolder();
        // this.title.appendChild(this.title_controls);
        this.title.after(this.title_controls); // Mahara

        if (this.schema.description) {
          this.description = this.theme.getDescription(this.translateProperty(this.schema.description));
          this.container.appendChild(this.description);
        }

        this.panel = this.theme.getIndentedPanel();
        this.container.appendChild(this.panel);
        this.error_holder = document.createElement('div');
        this.panel.appendChild(this.error_holder);
      } else {
        this.panel = document.createElement('div');
        this.container.appendChild(this.panel);
      }

      this.panel.appendChild(this.table);
      this.controls = this.theme.getButtonHolder();

      if (this.array_controls_top) {
        this.title.appendChild(this.controls);
      } else {
        this.panel.appendChild(this.controls);
      }

      if (this.item_has_child_editors) {
        var ce = tmp.getChildEditors();
        var order = tmp.property_order || Object.keys(ce);

        for (var i = 0; i < order.length; i++) {
          var th = this.theme.getTableHeaderCell(ce[order[i]].getTitle());
          if (ce[order[i]].options.hidden) th.style.display = 'none';
          this.header_row.appendChild(th);
        }
      } else {
        this.header_row.appendChild(this.theme.getTableHeaderCell(this.item_title));
      }

      tmp.destroy();
      this.row_holder.innerHTML = '';
      /* Row Controls column */

      this.controls_header_cell = this.theme.getTableHeaderCell(' ');
      this.controls_header_cell.setAttribute('aria-hidden', 'true');
      this.header_row.appendChild(this.controls_header_cell);
      /* Add controls */

      this.addControls();
    }
  }, {
    key: "onChildEditorChange",
    value: function onChildEditorChange(editor) {
      this.refreshValue();

      _get(_getPrototypeOf(TableEditor.prototype), "onChildEditorChange", this).call(this);
    }
  }, {
    key: "getItemDefault",
    value: function getItemDefault() {
      return Object(_utilities_js__WEBPACK_IMPORTED_MODULE_23__["extend"])({}, {
        "default": this.item_default
      })["default"];
    }
  }, {
    key: "getItemTitle",
    value: function getItemTitle() {
      return this.item_title;
    }
  }, {
    key: "getElementEditor",
    value: function getElementEditor(i, ignore) {
      var schemaCopy = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_23__["extend"])({}, this.schema.items);
      var editor = this.jsoneditor.getEditorClass(schemaCopy, this.jsoneditor);
      var row = this.row_holder.appendChild(this.theme.getTableRow());
      var holder = row;

      if (!this.item_has_child_editors) {
        holder = this.theme.getTableCell();
        row.appendChild(holder);
      }

      var ret = this.jsoneditor.createEditor(editor, {
        jsoneditor: this.jsoneditor,
        schema: schemaCopy,
        container: holder,
        path: "".concat(this.path, ".").concat(i),
        parent: this,
        compact: true,
        table_row: true
      });
      ret.preBuild();

      if (!ignore) {
        ret.build();
        ret.postBuild();
        ret.controls_cell = row.appendChild(this.theme.getTableCell());
        ret.row = row;
        ret.table_controls = this.theme.getButtonHolder();
        // ret.controls_cell.appendChild(ret.table_controls); // Mahara
        ret.table_controls.style.margin = 0;
        ret.table_controls.style.padding = 0;
      }

      return ret;
    }
  }, {
    key: "destroy",
    value: function destroy() {
      this.innerHTML = '';
      if (this.checkParent(this.title)) this.title.parentNode.removeChild(this.title);
      if (this.checkParent(this.description)) this.description.parentNode.removeChild(this.description);
      if (this.checkParent(this.row_holder)) this.row_holder.parentNode.removeChild(this.row_holder);
      if (this.checkParent(this.table)) this.table.parentNode.removeChild(this.table);
      if (this.checkParent(this.panel)) this.panel.parentNode.removeChild(this.panel);
      this.rows = this.title = this.description = this.row_holder = this.table = this.panel = null;

      _get(_getPrototypeOf(TableEditor.prototype), "destroy", this).call(this);
    }
  }, {
    key: "ensureArraySize",
    value: function ensureArraySize(value) {
      if (!Array.isArray(value)) value = [value];

      if (this.schema.minItems) {
        while (value.length < this.schema.minItems) {
          value.push(this.getItemDefault());
        }
      }

      if (this.schema.maxItems && value.length > this.schema.maxItems) {
        value = value.slice(0, this.schema.maxItems);
      }

      return value;
    }
  }, {
    key: "setValue",
    value: function setValue() {
      var _this = this;

      var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
      var initial = arguments.length > 1 ? arguments[1] : undefined;

      /* Make sure value has between minItems and maxItems items in it */
      value = this.ensureArraySize(value);
      var serialized = JSON.stringify(value);
      if (serialized === this.serialized) return;
      var numrowsChanged = false;
      value.forEach(function (val, i) {
        if (_this.rows[i]) {
          /* TODO: don't set the row's value if it hasn't changed */
          _this.rows[i].setValue(val);
        } else {
          _this.addRow(val);

          numrowsChanged = true;
        }
      });

      for (var j = value.length; j < this.rows.length; j++) {
        var holder = this.rows[j].container;

        if (!this.item_has_child_editors) {
          this.rows[j].row.parentNode.removeChild(this.rows[j].row);
        }

        this.rows[j].destroy();
        if (holder.parentNode) holder.parentNode.removeChild(holder);
        this.rows[j] = null;
        numrowsChanged = true;
      }

      this.rows = this.rows.slice(0, value.length);
      this.refreshValue();
      if (numrowsChanged || initial) this.refreshRowButtons();
      this.onChange();
      /* TODO: sortable */
    }
  }, {
    key: "refreshRowButtons",
    value: function refreshRowButtons() {
      var _this2 = this;

      /* If we currently have minItems items in the array */
      var minItems = this.schema.minItems && this.schema.minItems >= this.rows.length;
      /* If we currently have maxItems items in the array */

      var maxItems = this.schema.maxItems && this.schema.maxItems <= this.rows.length;
      var needRowButtons = [];
      this.rows.forEach(function (editor, i) {
        if (editor.delete_button) {
          /* Hide the delete button if we have minItems items */
          var display = !minItems;

          _this2.setVisibility(editor.delete_button, display);

          needRowButtons.push(display);
        }

        if (editor.copy_button) {
          /* Hide the copy button if we have maxItems items */
          var _display = !maxItems;

          _this2.setVisibility(editor.copy_button, _display);

          needRowButtons.push(_display);
        }

        if (editor.moveup_button) {
          /* Hide the moveup button for the first row */
          var _display2 = i !== 0;

          _this2.setVisibility(editor.moveup_button, _display2);

          needRowButtons.push(_display2);
        }

        if (editor.movedown_button) {
          /* Hide the movedown button for the last row */
          var _display3 = i !== _this2.rows.length - 1;

          _this2.setVisibility(editor.movedown_button, _display3);

          needRowButtons.push(_display3);
        }
      });
      var need = needRowButtons.some(function (e) {
        return e;
      });
      /* Show/hide controls column in table */

      this.rows.forEach(function (editor) {
        return _this2.setVisibility(editor.controls_cell, need);
      });
      this.setVisibility(this.controls_header_cell, need);
      this.setVisibility(this.table, this.value.length);
      /* If there are maxItems items in the array, or configured to hide the add_row_button button, hide the button beneath the rows */

      var display1 = !(maxItems || this.hide_add_button);
      this.setVisibility(this.add_row_button, display1);
      /* If there are minItems items in the array, or configured to hide the delete_last_row button, hide the button beneath the rows */

      var display2 = !(!this.value.length || minItems || this.hide_delete_last_row_buttons);
      this.setVisibility(this.delete_last_row_button, display2);
      /* If there are minItems items in the array, or configured to hide the remove_all_rows_button button, hide the button beneath the rows */

      var display3 = !(this.value.length <= 1 || minItems || this.hide_delete_all_rows_buttons);
      this.setVisibility(this.remove_all_rows_button, display3);
      var controlsNeeded = display1 || display2 || display3;
      this.setVisibility(this.controls, controlsNeeded);
    }
  }, {
    key: "refreshValue",
    value: function refreshValue() {
      var _this3 = this;

      this.value = [];
      this.rows.forEach(function (editor, i) {
        /* Get the value for this editor */
        _this3.value[i] = editor.getValue();
      });
      this.serialized = JSON.stringify(this.value);
    }
  }, {
    key: "addRow",
    value: function addRow(value) {
      var i = this.rows.length;
      this.rows[i] = this.getElementEditor(i);
      var controlsHolder = this.rows[i].table_controls;
      /* Buttons to delete row, copy row, move row up, and move row down */

      if (!this.hide_delete_buttons) {
        this.rows[i].delete_button = this._createDeleteButton(i, controlsHolder);
      }

      if (this.show_copy_button) {
        this.rows[i].copy_button = this._createCopyButton(i, controlsHolder);
      }

      if (!this.hide_move_buttons) {
        this.rows[i].moveup_button = this._createMoveUpButton(i, controlsHolder);
      }

      if (!this.hide_move_buttons) {
        this.rows[i].movedown_button = this._createMoveDownButton(i, controlsHolder);
      }

      if (typeof value !== 'undefined') this.rows[i].setValue(value);
    }
  }, {
    key: "_createDeleteButton", // Includes Mahara customisations
    value: function _createDeleteButton(i, holder) {
      var _this4 = this;
      // var button = this.getButton('', 'delete', 'button_delete_row_title_short');
      var button = this.getButton(this.translate('button_delete_row_title_short'),'delete',this.translate('button_delete_row_title', [this.getItemTitle()])); // Mahara
      button.classList.add('delete', 'json-editor-btntype-delete');
      button.setAttribute('data-i', i);
      button.addEventListener('click', function (e) {
        e.preventDefault();
        e.stopPropagation();

        if (!_this4.askConfirmation()) {
          return false;
        }

        var j = e.currentTarget.getAttribute('data-i') * 1;

        var value = _this4.getValue();

        value.splice(j, 1);

        _this4.setValue(value);

        _this4.onChange(true);

        _this4.jsoneditor.trigger('deleteRow', _this4.rows[j]);
      });
      holder.appendChild(button);
      return button;
    }
  }, {
    key: "_createCopyButton",
    value: function _createCopyButton(i, holder) {
      var _this5 = this;

      var button = this.getButton('', 'copy', 'button_copy_row_title_short');
      button.classList.add('copy', 'json-editor-btntype-copy');
      button.setAttribute('data-i', i);
      button.addEventListener('click', function (e) {
        e.preventDefault();
        e.stopPropagation();
        var j = e.currentTarget.getAttribute('data-i') * 1;

        var value = _this5.getValue();

        value.splice(j + 1, 0, value[j]);

        _this5.setValue(value);

        _this5.onChange(true);

        _this5.jsoneditor.trigger('copyRow', _this5.rows[j + 1]);
      });
      holder.appendChild(button);
      return button;
    }
  }, {
    key: "_createMoveUpButton", // TableEditor
    value: function _createMoveUpButton(i, holder) {
      var _this6 = this;
      // var button = this.getButton('', 'moveup', 'button_move_up_title');
      var button = this.getButton(this.translate('button_move_up'),'moveup',this.translate('button_move_up_title',[this.getItemTitle()])); // Mahara
      button.classList.add('moveup', 'json-editor-btntype-move');
      button.setAttribute('data-i', i);
      button.addEventListener('click', function (e) {
        e.preventDefault();
        e.stopPropagation();
        var j = e.currentTarget.getAttribute('data-i') * 1;

        var value = _this6.getValue();

        value.splice(j - 1, 0, value.splice(j, 1)[0]);

        _this6.setValue(value);

        _this6.onChange(true);

        _this6.jsoneditor.trigger('moveRow', _this6.rows[j - 1]);
      });
      holder.appendChild(button);
      return button;
    }
  }, {
    key: "_createMoveDownButton", // TableEditor
    value: function _createMoveDownButton(i, holder) {
      var _this7 = this;
      // var button = this.getButton('', 'movedown', 'button_move_down_title');
      var button = this.getButton(this.translate('button_move_down'),'movedown',this.translate('button_move_down_title', [this.getItemTitle()])); // Mahara
      button.classList.add('movedown', 'json-editor-btntype-move');
      button.setAttribute('data-i', i);
      button.addEventListener('click', function (e) {
        e.preventDefault();
        e.stopPropagation();
        var j = e.currentTarget.getAttribute('data-i') * 1;

        var value = _this7.getValue();

        value.splice(j + 1, 0, value.splice(j, 1)[0]);

        _this7.setValue(value);

        _this7.onChange(true);

        _this7.jsoneditor.trigger('moveRow', _this7.rows[j + 1]);
      });
      holder.appendChild(button);
      return button;
    }
  }, {
    key: "addControls",
    value: function addControls() {
      var _this8 = this;
      this.collapsed = false;
      this.toggle_button = this._createToggleButton();

      if (this.title_controls) {
        // this.title.insertBefore(this.toggle_button, this.title.childNodes[0]);
        this.title.after(this.toggle_button); // Mahara
        this.toggle_button.addEventListener('click', function (e) {
          e.preventDefault();
          e.stopPropagation();

          _this8.setVisibility(_this8.panel, _this8.collapsed);

          if (_this8.collapsed) {
            _this8.collapsed = false;
            _this8.toggle_button.setAttribute('aria-expanded', 'true'); // Mahara
            // _this8.setButtonText(e.currentTarget, '', 'collapse', 'button_collapse');
            _this8.setButtonText(this,_this8.translate('button_collapse'),'collapse',_this8.translate('button_collapse_title',[_this8.getTitle()])); // Mahara
          } else {
            _this8.collapsed = true;
            _this8.toggle_button.setAttribute('aria-expanded', 'false'); // Mahara
            // _this8.setButtonText(e.currentTarget, '', 'expand', 'button_expand');
            _this8.setButtonText(this,_this8.translate('button_expand'),'expand',_this8.translate('button_expand_title',[_this8.getTitle()])); // Mahara
          }
        });
        /* If it should start collapsed */

        if (this.options.collapsed) {
          Object(_utilities_js__WEBPACK_IMPORTED_MODULE_23__["trigger"])(this.toggle_button, 'click');
        }
        /* Collapse button disabled */


        if (this.schema.options && typeof this.schema.options.disable_collapse !== 'undefined') {
          if (this.schema.options.disable_collapse) this.toggle_button.style.display = 'none';
        } else if (this.jsoneditor.options.disable_collapse) {
          this.toggle_button.style.display = 'none';
        }
      }
      /* Add "new row" and "delete last" buttons below editor */


      this.add_row_button = this._createAddRowButton();
      this.delete_last_row_button = this._createDeleteLastRowButton();
      this.remove_all_rows_button = this._createRemoveAllRowsButton();
    }
  }, {
    key: "_createToggleButton",
    value: function _createToggleButton() {
      var button = this.getButton('', 'collapse', 'button_collapse');
      button.classList.add('json-editor-btntype-toggle');
      button.setAttribute('aria-expanded', 'true'); // Mahara
      button.removeAttribute('title'); // Mahara
      return button;
    }
  }, {
    key: "_createAddRowButton",
    value: function _createAddRowButton() {
      var _this9 = this;
      // var button = this.getButton(this.getItemTitle(), 'add', 'button_add_row_title', [this.getItemTitle()]);
      var button = this.getButton(this.translate('button_add_row_text'),'add',this.translate('button_add_row_title',[this.getItemTitle()])); // Mahara
      button.classList.add('json-editor-btntype-add');
      button.addEventListener('click', function (e) {
        e.preventDefault();
        e.stopPropagation();

        var editor = _this9.addRow();

        _this9.refreshValue();

        _this9.refreshRowButtons();

        _this9.onChange(true);

        _this9.jsoneditor.trigger('addRow', editor);
      });
      this.controls.appendChild(button);
      return button;
    }
  }, {
    key: "_createDeleteLastRowButton",
    value: function _createDeleteLastRowButton() {
      var _this10 = this;

      var button = this.getButton('button_delete_last', 'subtract', 'button_delete_last_title', [this.getItemTitle()]);
      button.classList.add('json-editor-btntype-deletelast');
      button.addEventListener('click', function (e) {
        e.preventDefault();
        e.stopPropagation();

        if (!_this10.askConfirmation()) {
          return false;
        }

        var rows = _this10.getValue();

        var editor = rows.pop();

        _this10.setValue(rows);

        _this10.onChange(true);

        _this10.jsoneditor.trigger('deleteRow', editor);
      });
      this.controls.appendChild(button);
      return button;
    }
  }, {
    key: "_createRemoveAllRowsButton",
    value: function _createRemoveAllRowsButton() {
      var _this11 = this;
      // var button = this.getButton('button_delete_all', 'delete', 'button_delete_all_title');
      var button = this.getButton(this.translate('button_delete_all'),'delete',this.translate('button_delete_all_title',[this.getHeaderText()])); // Mahara
      button.classList.add('json-editor-btntype-deleteall');
      button.addEventListener('click', function (e) {
        e.preventDefault();
        e.stopPropagation();

        if (!_this11.askConfirmation()) {
          return false;
        }

        _this11.setValue([]);

        _this11.onChange(true);

        _this11.jsoneditor.trigger('deleteAllRows');
      });
      this.controls.appendChild(button);
      return button;
    }
  }]);

  return TableEditor;
}(_array_js__WEBPACK_IMPORTED_MODULE_22__["ArrayEditor"]);

/***/ }),

/***/ "./src/editors/upload.js":
/*!*******************************!*\
  !*** ./src/editors/upload.js ***!
  \*******************************/
/*! exports provided: UploadEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UploadEditor", function() { return UploadEditor; });
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.date.to-string.js */ "./node_modules/core-js/modules/es.date.to-string.js");
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ "./node_modules/core-js/modules/es.regexp.to-string.js");
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.string.match.js */ "./node_modules/core-js/modules/es.string.match.js");
/* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_parse_float_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.parse-float.js */ "./node_modules/core-js/modules/es.parse-float.js");
/* harmony import */ var core_js_modules_es_parse_float_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_parse_float_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.number.to-fixed.js */ "./node_modules/core-js/modules/es.number.to-fixed.js");
/* harmony import */ var core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.array.reduce.js */ "./node_modules/core-js/modules/es.array.reduce.js");
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ "./node_modules/core-js/modules/es.regexp.constructor.js");
/* harmony import */ var core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.string.replace.js */ "./node_modules/core-js/modules/es.string.replace.js");
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_19__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_20__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_21__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_22__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_23__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_24__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_25__);
/* harmony import */ var _editor_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../editor.js */ "./src/editor.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }




























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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var UploadEditor = /*#__PURE__*/function (_AbstractEditor) {
  _inherits(UploadEditor, _AbstractEditor);

  var _super = _createSuper(UploadEditor);

  function UploadEditor() {
    _classCallCheck(this, UploadEditor);

    return _super.apply(this, arguments);
  }

  _createClass(UploadEditor, [{
    key: "getNumColumns",
    value: function getNumColumns() {
      return 4;
    }
  }, {
    key: "build",
    value: function build() {
      var _this = this;

      if (!this.options.compact) this.header = this.label = this.theme.getFormInputLabel(this.getTitle(), this.isRequired());
      if (this.schema.description) this.description = this.theme.getFormInputDescription(this.translateProperty(this.schema.description));
      if (this.options.infoText) this.infoButton = this.theme.getInfoButton(this.translateProperty(this.options.infoText));
      /* Editor options */

      this.options = this.expandCallbacks('upload', Object(_utilities_js__WEBPACK_IMPORTED_MODULE_27__["extend"])({}, {
        title: 'Browse',
        icon: '',
        auto_upload: false,

        /* Trigger file upload button automatically */
        hide_input: false,

        /* Hide the Browse button and name display (Only works if 'enable_drag_drop' is true) */
        enable_drag_drop: false,

        /* Enable Drag&Drop uploading */
        drop_zone_text: 'Drag & Drop file here',

        /* Text displayed in dropzone box */
        drop_zone_top: false,

        /* Position of dropzone. true=before button input, false=after button input */
        alt_drop_zone: '',

        /* Alternate DropZone DOM selector (Can be created inside another property) */
        mime_type: '',

        /* If set, restricts to mime type(s). Can be either a string or an array */
        max_upload_size: 0,

        /* Maximum file size allowed. 0 = no limit */
        upload_handler: function upload_handler(jseditor, type, file, cbs) {
          /* Default dummy test upload handler */
          window.alert("No upload_handler defined for \"".concat(jseditor.path, "\". You must create your own handler to enable upload to server"));
        }
      }, this.defaults.options.upload || {}, this.options.upload || {}));
      this.options.mime_type = this.options.mime_type ? [].concat(this.options.mime_type) : [];
      /* Input that holds the base64 string */

      this.input = this.theme.getFormInputField('hidden');
      this.container.appendChild(this.input);
      /* Don't show uploader if this is readonly */

      if (!this.schema.readOnly && !this.schema.readonly) {
        if (typeof this.options.upload_handler !== 'function') throw new Error('Upload handler required for upload editor');
        /* File uploader */

        this.uploader = this.theme.getFormInputField('file');
        this.uploader.style.display = 'none';
        if (this.options.mime_type.length) this.uploader.setAttribute('accept', this.options.mime_type);

        if (!(this.options.enable_drag_drop === true && this.options.hide_input === true)) {
          /* Pass click to this.uploader element */
          this.clickHandler = function (e) {
            _this.uploader.dispatchEvent(new window.MouseEvent('click', {
              view: window,
              bubbles: true,
              cancelable: false
            }));
          };
          /* Browse button */


          this.browseButton = this.getButton(this.options.title, this.options.icon, this.options.title);
          this.browseButton.addEventListener('click', this.clickHandler);
          /* Display field */

          this.fileDisplay = this.theme.getFormInputField('input');
          this.fileDisplay.setAttribute('readonly', true);
          this.fileDisplay.value = 'No file selected.';
          this.fileDisplay.addEventListener('dblclick', this.clickHandler);
          this.fileUploadGroup = this.theme.getInputGroup(this.fileDisplay, [this.browseButton]);

          if (!this.fileUploadGroup) {
            /* Themes that doesn't support input grouping */
            this.fileUploadGroup = document.createElement('div');
            this.fileUploadGroup.appendChild(this.fileDisplay);
            this.fileUploadGroup.appendChild(this.browseButton);
          }
        }
        /* Drag&Drop upload enabled */


        if (this.options.enable_drag_drop === true) {
          /* Alternate DropZone defined */
          if (this.options.alt_drop_zone !== '') {
            this.altDropZone = document.querySelector(this.options.alt_drop_zone);
            if (this.altDropZone) this.dropZone = this.altDropZone;else throw new Error("Error: alt_drop_zone selector \"".concat(this.options.alt_drop_zone, "\" not found!"));
          } else this.dropZone = this.theme.getDropZone(this.options.drop_zone_text);

          if (this.dropZone) {
            this.dropZone.classList.add('upload-dropzone');
            this.dropZone.addEventListener('dblclick', this.clickHandler);
          }
        }
        /* Triggered after file have been selected */


        this.uploadHandler = function (e) {
          e.preventDefault();
          e.stopPropagation();
          var files = e.target.files || e.dataTransfer.files;

          if (files && files.length) {
            if (_this.options.max_upload_size !== 0 && files[0].size > _this.options.max_upload_size) {
              _this.theme.addInputError(_this.uploader, "Filesize too large. Max size is ".concat(_this.options.max_upload_size));
            } else if (_this.options.mime_type.length !== 0 && !_this.isValidMimeType(files[0].type, _this.options.mime_type)) {
              _this.theme.addInputError(_this.uploader, "Wrong file format. Allowed format(s): ".concat(_this.options.mime_type.toString()));
            } else {
              if (_this.fileDisplay) _this.fileDisplay.value = files[0].name;
              var fr = new window.FileReader();

              fr.onload = function (evt) {
                _this.preview_value = evt.target.result;

                _this.refreshPreview(files);

                _this.onChange(true);

                fr = null;
              };

              fr.readAsDataURL(files[0]);
            }
          }
        };

        this.uploader.addEventListener('change', this.uploadHandler);
        /* Drag&Drop Event Handler */

        this.dragHandler = function (e) {
          var files = e.dataTransfer.items || e.dataTransfer.files;

          var validType = files && files.length && (_this.options.mime_type.length === 0 || _this.isValidMimeType(files[0].type, _this.options.mime_type));

          var validZone = e.currentTarget.classList && e.currentTarget.classList.contains('upload-dropzone') && validType;

          switch ((e.currentTarget === window ? 'w_' : 'e_') + e.type) {
            case 'w_drop':
            case 'w_dragover':
              /* prevent default browser action if dropped outside dropzone */
              if (!validZone) e.dataTransfer.dropEffect = 'none';
              break;

            case 'e_dragenter':
              {
                if (validZone) {
                  _this.dropZone.classList.add('valid-dropzone');

                  e.dataTransfer.dropEffect = 'copy';
                } else _this.dropZone.classList.add('invalid-dropzone');

                break;
              }

            case 'e_dragover':
              {
                if (validZone) e.dataTransfer.dropEffect = 'copy';
                break;
              }

            case 'e_dragleave':
              _this.dropZone.classList.remove('valid-dropzone', 'invalid-dropzone');

              break;

            case 'e_drop':
              {
                _this.dropZone.classList.remove('valid-dropzone', 'invalid-dropzone');

                if (validZone) _this.uploadHandler(e);
                break;
              }
          }

          if (!validZone) e.preventDefault();
        };
        /* Set Drag'n'Drop handlers */


        if (this.options.enable_drag_drop === true) {
          ['dragover', 'drop'].forEach(function (ev) {
            window.addEventListener(ev, _this.dragHandler, true);
          });
          ['dragenter', 'dragover', 'dragleave', 'drop'].forEach(function (ev) {
            _this.dropZone.addEventListener(ev, _this.dragHandler, true);
          });
        }
      }

      this.preview = document.createElement('div');
      this.control = this.input.controlgroup = this.theme.getFormControl(this.label, this.uploader || this.input, this.description, this.infoButton);
      if (this.uploader) this.uploader.controlgroup = this.control;
      var inputNode = this.uploader || this.input;
      var elements = document.createElement('div');
      if (this.dropZone && !this.altDropZone && this.options.drop_zone_top === true) elements.appendChild(this.dropZone);
      if (this.fileUploadGroup) elements.appendChild(this.fileUploadGroup);
      if (this.dropZone && !this.altDropZone && this.options.drop_zone_top !== true) elements.appendChild(this.dropZone);
      elements.appendChild(this.preview);
      inputNode.parentNode.insertBefore(elements, inputNode.nextSibling);
      this.container.appendChild(this.control);
      /* Any special formatting that needs to happen after the input is added to the dom */

      window.requestAnimationFrame(function () {
        _this.afterInputReady();
      });
    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady() {
      var _this2 = this;

      if (this.value) {
        var img = document.createElement('img');
        img.style.maxWidth = '100%';
        img.style.maxHeight = '100px';

        img.onload = function (event) {
          _this2.preview.appendChild(img);
        };

        img.onerror = function (error) {
          // eslint-disable-next-line no-console
          console.error('upload error', error, error.currentTarget);
        };

        img.src = this.container.querySelector('a').href;
      }

      this.theme.afterInputReady(this.input);
    }
  }, {
    key: "refreshPreview",
    value: function refreshPreview(files) {
      var _this3 = this;

      if (this.last_preview === this.preview_value) return;
      this.last_preview = this.preview_value;
      this.preview.innerHTML = '';
      if (!this.preview_value) return;
      var file = files[0];
      /* mime type extracted from file data. More exact than the one in the file object */

      var mime = this.preview_value.match(/^data:([^;,]+)[;,]/);
      file.mimeType = mime ? mime[1] : 'unknown';

      if (file.size > 0) {
        /* Format bytes as KB/MB etc. with 2 decimals */
        var i = Math.floor(Math.log(file.size) / Math.log(1024));
        file.formattedSize = "".concat(parseFloat((file.size / Math.pow(1024, i)).toFixed(2)), " ").concat(['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'][i]);
      } else file.formattedSize = '0 Bytes';

      var uploadButton = this.getButton('button_upload', 'upload', 'button_upload');
      uploadButton.addEventListener('click', function (event) {
        event.preventDefault();
        uploadButton.setAttribute('disabled', 'disabled');

        _this3.theme.removeInputError(_this3.uploader);

        if (_this3.theme.getProgressBar) {
          _this3.progressBar = _this3.theme.getProgressBar();

          _this3.preview.appendChild(_this3.progressBar);
        }

        _this3.options.upload_handler(_this3.path, file, {
          success: function success(url) {
            _this3.setValue(url);

            if (_this3.parent) _this3.parent.onChildEditorChange(_this3);else _this3.jsoneditor.onChange();
            if (_this3.progressBar) _this3.preview.removeChild(_this3.progressBar);
            uploadButton.removeAttribute('disabled');
          },
          failure: function failure(error) {
            _this3.theme.addInputError(_this3.uploader, error);

            if (_this3.progressBar) _this3.preview.removeChild(_this3.progressBar);
            uploadButton.removeAttribute('disabled');
          },
          updateProgress: function updateProgress(progress) {
            if (_this3.progressBar) {
              if (progress) _this3.theme.updateProgressBar(_this3.progressBar, progress);else _this3.theme.updateProgressBarUnknown(_this3.progressBar);
            }
          }
        });
      });
      this.preview.appendChild(this.theme.getUploadPreview(file, uploadButton, this.preview_value));

      if (this.options.auto_upload) {
        uploadButton.dispatchEvent(new window.MouseEvent('click'));
        this.preview.removeChild(uploadButton);
      }
    }
  }, {
    key: "enable",
    value: function enable() {
      if (!this.always_disabled) {
        if (this.uploader) this.uploader.disabled = false;

        _get(_getPrototypeOf(UploadEditor.prototype), "enable", this).call(this);
      }
    }
  }, {
    key: "disable",
    value: function disable(alwaysDisabled) {
      if (alwaysDisabled) this.always_disabled = true;
      if (this.uploader) this.uploader.disabled = true;

      _get(_getPrototypeOf(UploadEditor.prototype), "disable", this).call(this);
    }
  }, {
    key: "setValue",
    value: function setValue(val) {
      if (this.value !== val) {
        this.value = val;
        this.input.value = this.value;
        this.onChange();
      }
    }
  }, {
    key: "destroy",
    value: function destroy() {
      var _this4 = this;

      /* Remove Drag'n'Drop handlers */
      if (this.options.enable_drag_drop === true) {
        ['dragover', 'drop'].forEach(function (ev) {
          window.removeEventListener(ev, _this4.dragHandler, true);
        });
        ['dragenter', 'dragover', 'dragleave', 'drop'].forEach(function (ev) {
          _this4.dropZone.removeEventListener(ev, _this4.dragHandler, true);
        });
        this.dropZone.removeEventListener('dblclick', this.clickHandler);
        if (this.dropZone && this.dropZone.parentNode) this.dropZone.parentNode.removeChild(this.dropZone);
      }

      if (this.uploader && this.uploader.parentNode) {
        this.uploader.removeEventListener('change', this.uploadHandler);
        this.uploader.parentNode.removeChild(this.uploader);
      }

      if (this.browseButton && this.browseButton.parentNode) {
        this.browseButton.removeEventListener('click', this.clickHandler);
        this.browseButton.parentNode.removeChild(this.browseButton);
      }

      if (this.fileDisplay && this.fileDisplay.parentNode) {
        this.fileDisplay.removeEventListener('dblclick', this.clickHandler);
        this.fileDisplay.parentNode.removeChild(this.fileDisplay);
      }

      if (this.fileUploadGroup && this.fileUploadGroup.parentNode) this.fileUploadGroup.parentNode.removeChild(this.fileUploadGroup);
      if (this.preview && this.preview.parentNode) this.preview.parentNode.removeChild(this.preview);
      if (this.header && this.header.parentNode) this.header.parentNode.removeChild(this.header);
      if (this.input && this.input.parentNode) this.input.parentNode.removeChild(this.input);

      _get(_getPrototypeOf(UploadEditor.prototype), "destroy", this).call(this);
    }
  }, {
    key: "isValidMimeType",
    value: function isValidMimeType(mimeType, mimeTypesList) {
      return mimeTypesList.reduce(function (a, v) {
        return a || new RegExp(v.replace(/\*/g, '.*'), 'gi').test(mimeType);
      }, false);
    }
  }]);

  return UploadEditor;
}(_editor_js__WEBPACK_IMPORTED_MODULE_26__["AbstractEditor"]);

/***/ }),

/***/ "./src/editors/uuid.js":
/*!*****************************!*\
  !*** ./src/editors/uuid.js ***!
  \*****************************/
/*! exports provided: UuidEditor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UuidEditor", function() { return UuidEditor; });
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.date.to-string.js */ "./node_modules/core-js/modules/es.date.to-string.js");
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.string.replace.js */ "./node_modules/core-js/modules/es.string.replace.js");
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ "./node_modules/core-js/modules/es.regexp.to-string.js");
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./string.js */ "./src/editors/string.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }




















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }


var UuidEditor = /*#__PURE__*/function (_StringEditor) {
  _inherits(UuidEditor, _StringEditor);

  var _super = _createSuper(UuidEditor);

  function UuidEditor() {
    _classCallCheck(this, UuidEditor);

    return _super.apply(this, arguments);
  }

  _createClass(UuidEditor, [{
    key: "preBuild",
    value: function preBuild() {
      _get(_getPrototypeOf(UuidEditor.prototype), "preBuild", this).call(this);
      /* Use Schema "default" for setting autogenerated uuid */


      this.schema["default"] = this.uuid = this.getUuid();
      /* Set cleave options if no existing options is present */

      if (!this.schema.options) this.schema.options = {};

      if (!this.schema.options.cleave) {
        this.schema.options.cleave = {
          delimiters: ['-'],
          blocks: [8, 4, 4, 4, 12]
        };
      }
    }
  }, {
    key: "build",
    value: function build() {
      _get(_getPrototypeOf(UuidEditor.prototype), "build", this).call(this);
      /* Set field to readonly */


      this.disable(true);
      this.input.setAttribute('readonly', 'true');
    }
  }, {
    key: "sanitize",
    value: function sanitize(value) {
      if (!this.testUuid(value)) value = this.uuid;
      return value;
    }
  }, {
    key: "setValue",
    value: function setValue(value, initial, fromTemplate) {
      if (!this.testUuid(value)) value = this.uuid;
      this.uuid = value;

      _get(_getPrototypeOf(UuidEditor.prototype), "setValue", this).call(this, value, initial, fromTemplate);
    }
  }, {
    key: "getUuid",
    value: function getUuid() {
      /* https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript */
      var d = new Date().getTime();

      if (typeof performance !== 'undefined' && typeof performance.now === 'function') {
        d += performance.now();
        /* use high-precision timer if available */
      }

      return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
        var r = (d + Math.random() * 16) % 16 | 0;
        d = Math.floor(d / 16);
        return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
      });
    }
  }, {
    key: "testUuid",
    value: function testUuid(value) {
      return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value);
    }
  }]);

  return UuidEditor;
}(_string_js__WEBPACK_IMPORTED_MODULE_18__["StringEditor"]);

/***/ }),

/***/ "./src/iconlib.js":
/*!************************!*\
  !*** ./src/iconlib.js ***!
  \************************/
/*! exports provided: AbstractIconLib */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractIconLib", function() { return AbstractIconLib; });
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.string.split.js */ "./node_modules/core-js/modules/es.string.split.js");
/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ "./node_modules/core-js/modules/es.array.is-array.js");
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js");
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_13__);















function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }

function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }

function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

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); return Constructor; }

var defaultMapping = {
  collapse: '',
  expand: '',
  "delete": '',
  edit: '',
  add: '',
  cancel: '',
  save: '',
  moveup: '',
  movedown: ''
};
var AbstractIconLib = /*#__PURE__*/function () {
  function AbstractIconLib() {
    var iconPrefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
    var mapping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultMapping;

    _classCallCheck(this, AbstractIconLib);

    this.mapping = mapping;
    this.icon_prefix = iconPrefix;
  }

  _createClass(AbstractIconLib, [{
    key: "getIconClass",
    value: function getIconClass(key) {
      return this.mapping[key] ? this.icon_prefix + this.mapping[key] : null;
    }
  }, {
    key: "getIcon",
    value: function getIcon(key) {
      var _i$classList;

      var iconclass = this.getIconClass(key);
      if (!iconclass) return null;
      var i = document.createElement('i');

      (_i$classList = i.classList).add.apply(_i$classList, _toConsumableArray(iconclass.split(' ')));

      return i;
    }
  }]);

  return AbstractIconLib;
}();

/***/ }),

/***/ "./src/iconlibs/bootstrap3.js":
/*!************************************!*\
  !*** ./src/iconlibs/bootstrap3.js ***!
  \************************************/
/*! exports provided: bootstrap3Iconlib */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bootstrap3Iconlib", function() { return bootstrap3Iconlib; });
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _iconlib_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../iconlib.js */ "./src/iconlib.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }













function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }


var iconPrefix = 'glyphicon glyphicon-';
var mapping = {
  collapse: 'chevron-down',
  expand: 'chevron-right',
  "delete": 'trash',
  edit: 'pencil',
  add: 'plus',
  subtract: 'minus',
  cancel: 'floppy-remove',
  save: 'floppy-saved',
  moveup: 'arrow-up',
  moveright: 'arrow-right',
  movedown: 'arrow-down',
  moveleft: 'arrow-left',
  copy: 'copy',
  clear: 'remove-circle',
  time: 'time',
  calendar: 'calendar',
  edit_properties: 'list'
};
var bootstrap3Iconlib = /*#__PURE__*/function (_AbstractIconLib) {
  _inherits(bootstrap3Iconlib, _AbstractIconLib);

  var _super = _createSuper(bootstrap3Iconlib);

  function bootstrap3Iconlib() {
    _classCallCheck(this, bootstrap3Iconlib);

    return _super.call(this, iconPrefix, mapping);
  }

  return bootstrap3Iconlib;
}(_iconlib_js__WEBPACK_IMPORTED_MODULE_11__["AbstractIconLib"]);

/***/ }),

/***/ "./src/iconlibs/fontawesome3.js":
/*!**************************************!*\
  !*** ./src/iconlibs/fontawesome3.js ***!
  \**************************************/
/*! exports provided: fontawesome3Iconlib */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fontawesome3Iconlib", function() { return fontawesome3Iconlib; });
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _iconlib_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../iconlib.js */ "./src/iconlib.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }













function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }


var iconPrefix = 'icon-';
var mapping = {
  collapse: 'chevron-down',
  expand: 'chevron-right',
  "delete": 'trash',
  edit: 'pencil',
  add: 'plus',
  subtract: 'minus',
  cancel: 'ban-circle',
  save: 'save',
  moveup: 'arrow-up',
  moveright: 'arrow-right',
  movedown: 'arrow-down',
  moveleft: 'arrow-left',
  copy: 'copy',
  clear: 'remove-circle',
  time: 'time',
  calendar: 'calendar',
  edit_properties: 'list'
};
var fontawesome3Iconlib = /*#__PURE__*/function (_AbstractIconLib) {
  _inherits(fontawesome3Iconlib, _AbstractIconLib);

  var _super = _createSuper(fontawesome3Iconlib);

  function fontawesome3Iconlib() {
    _classCallCheck(this, fontawesome3Iconlib);

    return _super.call(this, iconPrefix, mapping);
  }

  return fontawesome3Iconlib;
}(_iconlib_js__WEBPACK_IMPORTED_MODULE_11__["AbstractIconLib"]);

/***/ }),

/***/ "./src/iconlibs/fontawesome4.js":
/*!**************************************!*\
  !*** ./src/iconlibs/fontawesome4.js ***!
  \**************************************/
/*! exports provided: fontawesome4Iconlib */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fontawesome4Iconlib", function() { return fontawesome4Iconlib; });
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _iconlib_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../iconlib.js */ "./src/iconlib.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }













function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }


var iconPrefix = 'fa icon-'; // Mahara uses icon- instead of fa-
var mapping = {
  collapse: 'caret-square-o-down',
  expand: 'caret-square-o-right',
  "delete": 'times',
  edit: 'pencil',
  add: 'plus',
  subtract: 'minus',
  cancel: 'ban',
  save: 'save',
  moveup: 'arrow-up',
  moveright: 'arrow-right',
  movedown: 'arrow-down',
  moveleft: 'arrow-left',
  copy: 'files-o',
  clear: 'times-circle-o',
  time: 'clock-o',
  calendar: 'calendar',
  edit_properties: 'list'
};
var fontawesome4Iconlib = /*#__PURE__*/function (_AbstractIconLib) {
  _inherits(fontawesome4Iconlib, _AbstractIconLib);

  var _super = _createSuper(fontawesome4Iconlib);

  function fontawesome4Iconlib() {
    _classCallCheck(this, fontawesome4Iconlib);

    return _super.call(this, iconPrefix, mapping);
  }

  return fontawesome4Iconlib;
}(_iconlib_js__WEBPACK_IMPORTED_MODULE_11__["AbstractIconLib"]);

/***/ }),

/***/ "./src/iconlibs/fontawesome5.js":
/*!**************************************!*\
  !*** ./src/iconlibs/fontawesome5.js ***!
  \**************************************/
/*! exports provided: fontawesome5Iconlib */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fontawesome5Iconlib", function() { return fontawesome5Iconlib; });
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _iconlib_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../iconlib.js */ "./src/iconlib.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }













function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }


var iconPrefix = 'fas icon-'; // Mahara uses icon- instead of fa-
var mapping = {
  collapse: 'caret-down',
  expand: 'caret-right',
  "delete": 'trash',
  edit: 'pen',
  add: 'plus',
  subtract: 'minus',
  cancel: 'ban',
  save: 'save',
  moveup: 'arrow-up',
  moveright: 'arrow-right',
  movedown: 'arrow-down',
  moveleft: 'arrow-left',
  copy: 'copy',
  clear: 'times-circle',
  time: 'clock',
  calendar: 'calendar',
  edit_properties: 'list'
};
var fontawesome5Iconlib = /*#__PURE__*/function (_AbstractIconLib) {
  _inherits(fontawesome5Iconlib, _AbstractIconLib);

  var _super = _createSuper(fontawesome5Iconlib);

  function fontawesome5Iconlib() {
    _classCallCheck(this, fontawesome5Iconlib);

    return _super.call(this, iconPrefix, mapping);
  }

  return fontawesome5Iconlib;
}(_iconlib_js__WEBPACK_IMPORTED_MODULE_11__["AbstractIconLib"]);

/***/ }),

/***/ "./src/iconlibs/index.js":
/*!*******************************!*\
  !*** ./src/iconlibs/index.js ***!
  \*******************************/
/*! exports provided: iconlibs */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iconlibs", function() { return iconlibs; });
/* harmony import */ var _bootstrap3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./bootstrap3.js */ "./src/iconlibs/bootstrap3.js");
/* harmony import */ var _fontawesome3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fontawesome3.js */ "./src/iconlibs/fontawesome3.js");
/* harmony import */ var _fontawesome4_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fontawesome4.js */ "./src/iconlibs/fontawesome4.js");
/* harmony import */ var _fontawesome5_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fontawesome5.js */ "./src/iconlibs/fontawesome5.js");
/* harmony import */ var _jqueryui_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./jqueryui.js */ "./src/iconlibs/jqueryui.js");
/* harmony import */ var _openiconic_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./openiconic.js */ "./src/iconlibs/openiconic.js");
/* harmony import */ var _spectre_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./spectre.js */ "./src/iconlibs/spectre.js");
// import  { bootstrap2Iconlib } from  './bootstrap2.js'



 // import  { foundation2Iconlib } from  './foundation2.js'
// import  { foundation3Iconlib } from  './foundation3.js'

 // import  { materialiconsIconlib } from  './materialicons.js'



var iconlibs = {
  // bootstrap2: bootstrap2Iconlib,
  bootstrap3: _bootstrap3_js__WEBPACK_IMPORTED_MODULE_0__["bootstrap3Iconlib"],
  fontawesome3: _fontawesome3_js__WEBPACK_IMPORTED_MODULE_1__["fontawesome3Iconlib"],
  fontawesome4: _fontawesome4_js__WEBPACK_IMPORTED_MODULE_2__["fontawesome4Iconlib"],
  fontawesome5: _fontawesome5_js__WEBPACK_IMPORTED_MODULE_3__["fontawesome5Iconlib"],
  // foundation2: foundation2Iconlib,
  // foundation3: foundation3Iconlib,
  jqueryui: _jqueryui_js__WEBPACK_IMPORTED_MODULE_4__["jqueryuiIconlib"],
  // materialicons: materialiconsIconlib,
  openiconic: _openiconic_js__WEBPACK_IMPORTED_MODULE_5__["openiconicIconlib"],
  spectre: _spectre_js__WEBPACK_IMPORTED_MODULE_6__["spectreIconlib"]
};

/***/ }),

/***/ "./src/iconlibs/jqueryui.js":
/*!**********************************!*\
  !*** ./src/iconlibs/jqueryui.js ***!
  \**********************************/
/*! exports provided: jqueryuiIconlib */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jqueryuiIconlib", function() { return jqueryuiIconlib; });
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _iconlib_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../iconlib.js */ "./src/iconlib.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }













function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }


var iconPrefix = 'ui-icon ui-icon-';
var mapping = {
  collapse: 'triangle-1-s',
  expand: 'triangle-1-e',
  "delete": 'trash',
  edit: 'pencil',
  add: 'plusthick',
  subtract: 'minusthick',
  cancel: 'closethick',
  save: 'disk',
  moveup: 'arrowthick-1-n',
  moveright: 'arrowthick-1-e',
  movedown: 'arrowthick-1-s',
  moveleft: 'arrowthick-1-w',
  copy: 'copy',
  clear: 'circle-close',
  time: 'time',
  calendar: 'calendar',
  edit_properties: 'note'
};
var jqueryuiIconlib = /*#__PURE__*/function (_AbstractIconLib) {
  _inherits(jqueryuiIconlib, _AbstractIconLib);

  var _super = _createSuper(jqueryuiIconlib);

  function jqueryuiIconlib() {
    _classCallCheck(this, jqueryuiIconlib);

    return _super.call(this, iconPrefix, mapping);
  }

  return jqueryuiIconlib;
}(_iconlib_js__WEBPACK_IMPORTED_MODULE_11__["AbstractIconLib"]);

/***/ }),

/***/ "./src/iconlibs/openiconic.js":
/*!************************************!*\
  !*** ./src/iconlibs/openiconic.js ***!
  \************************************/
/*! exports provided: openiconicIconlib */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "openiconicIconlib", function() { return openiconicIconlib; });
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _iconlib_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../iconlib.js */ "./src/iconlib.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }













function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }


var iconPrefix = 'oi oi-';
var mapping = {
  collapse: 'collapse-down',
  expand: 'expand-right',
  "delete": 'trash',
  edit: 'pencil',
  add: 'plus',
  subtract: 'minus',
  cancel: 'ban',
  save: 'file',
  moveup: 'arrow-thick-top',
  moveright: 'arrow-thick-right',
  movedown: 'arrow-thick-bottom',
  moveleft: 'arrow-thick-left',
  copy: 'clipboard',
  clear: 'circle-x',
  time: 'clock',
  calendar: 'calendar',
  edit_properties: 'list'
};
var openiconicIconlib = /*#__PURE__*/function (_AbstractIconLib) {
  _inherits(openiconicIconlib, _AbstractIconLib);

  var _super = _createSuper(openiconicIconlib);

  function openiconicIconlib() {
    _classCallCheck(this, openiconicIconlib);

    return _super.call(this, iconPrefix, mapping);
  }

  return openiconicIconlib;
}(_iconlib_js__WEBPACK_IMPORTED_MODULE_11__["AbstractIconLib"]);

/***/ }),

/***/ "./src/iconlibs/spectre.js":
/*!*********************************!*\
  !*** ./src/iconlibs/spectre.js ***!
  \*********************************/
/*! exports provided: spectreIconlib */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "spectreIconlib", function() { return spectreIconlib; });
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _iconlib_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../iconlib.js */ "./src/iconlib.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }













function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }


var iconPrefix = 'icon icon-';
var mapping = {
  collapse: 'arrow-down',
  expand: 'arrow-right',
  "delete": 'delete',
  edit: 'edit',
  add: 'plus',
  subtract: 'minus',
  cancel: 'cross',
  save: 'check',
  moveup: 'upward',
  moveright: 'forward',
  movedown: 'downward',
  moveleft: 'back',
  copy: 'copy',
  clear: 'close',
  time: 'time',
  calendar: 'bookmark',
  edit_properties: 'menu'
};
var spectreIconlib = /*#__PURE__*/function (_AbstractIconLib) {
  _inherits(spectreIconlib, _AbstractIconLib);

  var _super = _createSuper(spectreIconlib);

  function spectreIconlib() {
    _classCallCheck(this, spectreIconlib);

    return _super.call(this, iconPrefix, mapping);
  }

  return spectreIconlib;
}(_iconlib_js__WEBPACK_IMPORTED_MODULE_11__["AbstractIconLib"]);

/***/ }),

/***/ "./src/resolvers.js":
/*!**************************!*\
  !*** ./src/resolvers.js ***!
  \**************************/
/*! exports provided: resolvers */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resolvers", function() { return resolvers; });
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ "./node_modules/core-js/modules/es.array.is-array.js");
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_1__);



/* Use "multiple" as a fall back for everything */
var defaultResolver = function defaultResolver(schema) {
  return typeof schema.type !== 'string' && 'multiple';
};
/* If the type is not set but properties are defined, we can infer the type is actually object */


var object = function object(schema) {
  return !schema.type && schema.properties && 'object';
};
/* If the type is set and it's a basic type, use the primitive editor */


var primitive = function primitive(schema) {
  return typeof schema.type === 'string' && schema.type;
};
/* Use specialized editor for signatures */


var signature = function signature(schema) {
  return schema.type === 'string' && schema.format === 'signature' && 'signature';
};
/* Use the select editor for all boolean values */


var _boolean = function _boolean(schema) {
  if (schema.type === 'boolean') {
    /* If explicitly set to 'checkbox', use that */
    if (schema.format === 'checkbox' || schema.options && schema.options.checkbox) return 'checkbox';
    /* Otherwise, default to select menu */

    if (schema.format === 'select2') return 'select2';
    if (schema.format === 'selectize') return 'selectize';
    if (schema.format === 'choices') return 'choices';
    return 'select';
  }
};
/* Use the multiple editor for schemas where the `type` is set to "any" */


var any = function any(schema) {
  return schema.type === 'any' && 'multiple';
};
/* Editor for base64 encoded files */


var base64 = function base64(schema) {
  return schema.type === 'string' && schema.media && schema.media.binaryEncoding === 'base64' && 'base64';
};
/* Editor for uploading files */


var upload = function upload(schema) {
  return schema.type === 'string' && schema.format === 'url' && window.FileReader && schema.options && schema.options.upload === Object(schema.options.upload) && 'upload';
};
/* Use the table editor for arrays with the format set to `table` */


var table = function table(schema) {
  return schema.type === 'array' && schema.format === 'table' && 'table';
};
/* Use the `select` editor for dynamic enumSource enums */


var enumSource = function enumSource(schema) {
  if (schema.enumSource) {
    if (schema.format === 'radio') return 'radio';
    if (schema.format === 'select2') return 'select2';
    if (schema.format === 'selectize') return 'selectize';
    if (schema.format === 'choices') return 'choices';
    return 'select';
  }
};
/* Use the `enum` or `select` editors for schemas with enumerated properties */


var enumeratedProperties = function enumeratedProperties(schema) {
  if (schema["enum"]) {
    if (schema.type === 'array' || schema.type === 'object') return 'enum';

    if (schema.type === 'number' || schema.type === 'integer' || schema.type === 'string') {
      if (schema.format === 'radio') return 'radio';
      if (schema.format === 'select2') return 'select2';
      if (schema.format === 'selectize') return 'selectize';
      if (schema.format === 'choices') return 'choices';
      return 'select';
    }
  }
};
/* Specialized editors for arrays of strings */


var arraysOfStrings = function arraysOfStrings(schema) {
  if (schema.type === 'array' && schema.items && !Array.isArray(schema.items) && ['string', 'number', 'integer'].includes(schema.items.type)) {
    if (schema.format === 'choices') return 'arrayChoices';

    if (schema.uniqueItems) {
      /* if 'selectize' enabled it is expected to be selectized control */
      if (schema.format === 'selectize') return 'arraySelectize';
      if (schema.format === 'select2') return 'arraySelect2';
      if (schema.items["enum"]) return 'multiselect';
      /* otherwise it is select */
    }
  }
};
/* Use the multiple editor for schemas with `oneOf` or `anyOf` set */


var oneOf = function oneOf(schema) {
  return (schema.oneOf || schema.anyOf) && 'multiple';
};
/* Specialized editor for date, time and datetime-local formats */


var date = function date(schema) {
  return ['string', 'integer'].includes(schema.type) && ['date', 'time', 'datetime-local'].includes(schema.format) && 'datetime';
};
/* Use a specialized editor for starratings */


var starratings = function starratings(schema) {
  return ['string', 'integer'].includes(schema.type) && ['starrating', 'rating'].includes(schema.format) && 'starrating';
};
/* Hyper-link describeBy resolver */


var describeBy = function describeBy(schema) {
  if (schema.links) {
    for (var i = 0; i < schema.links.length; i++) {
      if (schema.links[i].rel && schema.links[i].rel.toLowerCase() === 'describedby') return 'describedBy';
    }
  }
};
/* Use the stepper editor for schemas with type `number` or `integer` and format `stepper` */


var stepper = function stepper(schema) {
  if ((schema.type === 'integer' || schema.type === 'number') && schema.format === 'stepper') {
    return 'stepper';
  }
};
/* Enable custom editor type */


var button = function button(schema) {
  return schema.format === 'button' && 'button';
};

var info = function info(schema) {
  return schema.format === 'info' && 'info';
};

var uuid = function uuid(schema) {
  return schema.type === 'string' && schema.format === 'uuid' && 'uuid';
};

var autoComplete = function autoComplete(schema) {
  return schema.type === 'string' && schema.format === 'autocomplete' && 'autocomplete';
};

var jodit = function jodit(schema) {
  return schema.type === 'string' && schema.format === 'jodit' && 'jodit';
};

var markdown = function markdown(schema) {
  return schema.type === 'string' && schema.format === 'markdown' && 'simplemde';
};

var xhtml = function xhtml(schema) {
  return schema.type === 'string' && ['xhtml', 'bbcode'].includes(schema.format) && 'sceditor';
};
/* Use the ace editor for schemas with format equals any of ace editor modes */


var aceModes = ['actionscript', 'batchfile', 'c', 'c++', 'cpp', 'coffee', 'csharp', 'css', 'dart', 'django', 'ejs', 'erlang', 'golang', 'groovy', 'handlebars', 'haskell', 'haxe', 'html', 'ini', 'jade', 'java', 'javascript', 'json', 'less', 'lisp', 'lua', 'makefile', 'matlab', 'mysql', 'objectivec', 'pascal', 'perl', 'pgsql', 'php', 'python', 'r', 'ruby', 'sass', 'scala', 'scss', 'smarty', 'sql', 'sqlserver', 'stylus', 'svg', 'twig', 'vbscript', 'xml', 'yaml'];

var ace = function ace(schema) {
  return schema.type === 'string' && aceModes.includes(schema.format) && 'ace';
};

var ip = function ip(schema) {
  return schema.type === 'string' && ['ip', 'ipv4', 'ipv6', 'hostname'].includes(schema.format) && 'ip';
};

var colorPicker = function colorPicker(schema) {
  return schema.type === 'string' && schema.format === 'color' && 'colorpicker';
};
/* Export resolvers in order of discovery, first to last */


var resolvers = [colorPicker, ip, ace, xhtml, markdown, jodit, autoComplete, uuid, info, button, stepper, describeBy, starratings, date, oneOf, arraysOfStrings, enumeratedProperties, enumSource, table, upload, base64, any, _boolean, signature, primitive, object, defaultResolver];

/***/ }),

/***/ "./src/schemaloader.js":
/*!*****************************!*\
  !*** ./src/schemaloader.js ***!
  \*****************************/
/*! exports provided: SchemaLoader */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SchemaLoader", function() { return SchemaLoader; });
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.entries.js */ "./node_modules/core-js/modules/es.object.entries.js");
/* harmony import */ var core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ "./node_modules/core-js/modules/es.array.is-array.js");
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.array.reduce.js */ "./node_modules/core-js/modules/es.array.reduce.js");
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_string_starts_with_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.string.starts-with.js */ "./node_modules/core-js/modules/es.string.starts-with.js");
/* harmony import */ var core_js_modules_es_string_starts_with_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_starts_with_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.object.values.js */ "./node_modules/core-js/modules/es.object.values.js");
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.string.split.js */ "./node_modules/core-js/modules/es.string.split.js");
/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.array.join.js */ "./node_modules/core-js/modules/es.array.join.js");
/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_array_index_of_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.array.index-of.js */ "./node_modules/core-js/modules/es.array.index-of.js");
/* harmony import */ var core_js_modules_es_array_index_of_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_index_of_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ "./node_modules/core-js/modules/es.string.includes.js");
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_19__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_20__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_21__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_22__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_23__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_24__);
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_25__);
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_26__);
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js");
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_27__);
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./utilities.js */ "./src/utilities.js");
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }






























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

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); return Constructor; }


var SchemaLoader = /*#__PURE__*/function () {
  function SchemaLoader(options) {
    _classCallCheck(this, SchemaLoader);

    this.options = options || {};
    this.refs = this.options.refs || {};
    this.refs_with_info = {};
    this.refs_prefix = '#/counter/';
    this.refs_counter = 1;
    this._subSchema1 = {
      /* Version 3 `type` */
      type: function type(schema) {
        if (_typeof(schema.type) === 'object') {
          schema.type = this._expandSubSchema(schema.type);
        }
      },

      /* Version 3 `disallow` */
      disallow: function disallow(schema) {
        if (_typeof(schema.disallow) === 'object') {
          schema.disallow = this._expandSubSchema(schema.disallow);
        }
      },

      /* Version 4 `anyOf` */
      anyOf: function anyOf(schema) {
        var _this = this;

        Object.entries(schema.anyOf).forEach(function (_ref) {
          var _ref2 = _slicedToArray(_ref, 2),
              key = _ref2[0],
              value = _ref2[1];

          schema.anyOf[key] = _this.expandSchema(value);
        });
      },

      /* Version 4 `dependencies` (schema dependencies) */
      dependencies: function dependencies(schema) {
        var _this2 = this;

        Object.entries(schema.dependencies).forEach(function (_ref3) {
          var _ref4 = _slicedToArray(_ref3, 2),
              key = _ref4[0],
              value = _ref4[1];

          if (_typeof(value) === 'object' && !Array.isArray(value)) {
            schema.dependencies[key] = _this2.expandSchema(value);
          }
        });
      },

      /* Version 4 `not` */
      not: function not(schema) {
        schema.not = this.expandSchema(schema.not);
      }
    };
    this._subSchema2 = {
      /* allOf schemas should be merged into the parent */
      allOf: function allOf(schema, extended) {
        var _this3 = this;

        var _extended = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_28__["extend"])({}, extended);

        Object.entries(schema.allOf).forEach(function (_ref5) {
          var _ref6 = _slicedToArray(_ref5, 2),
              key = _ref6[0],
              value = _ref6[1];

          schema.allOf[key] = _this3.expandRefs(value, true);
          _extended = _this3.extendSchemas(_extended, _this3.expandSchema(value));
        });
        delete _extended.allOf;
        return _extended;
      },

      /* extends schemas should be merged into parent */
      "extends": function _extends(schema, extended) {
        var _this4 = this;

        var _extended;
        /* If extends is a schema */


        if (!Array.isArray(schema["extends"])) {
          _extended = this.extendSchemas(extended, this.expandSchema(schema["extends"]));
        } else {
          /* If extends is an array of schemas */
          _extended = schema["extends"].reduce(function (e, s, i) {
            return _this4.extendSchemas(e, _this4.expandSchema(s));
          }, extended);
        }

        delete _extended["extends"];
        return _extended;
      },

      /* parent should be merged into oneOf schemas */
      oneOf: function oneOf(schema, extended) {
        var _this5 = this;

        var tmp = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_28__["extend"])({}, extended);
        delete tmp.oneOf;
        schema.oneOf.reduce(function (e, s, i) {
          e.oneOf[i] = _this5.extendSchemas(_this5.expandSchema(s), tmp);
          return e;
        }, extended);
        return extended;
      }
    };
  }

  _createClass(SchemaLoader, [{
    key: "load",
    value: function load(schema, callback, fetchUrl, location) {
      var _this6 = this;

      this._loadExternalRefs(schema, function () {
        _this6._getDefinitions(schema, "".concat(fetchUrl, "#/definitions/"));

        callback(_this6.expandRefs(schema));
      }, fetchUrl, this._getFileBase(location));
    }
  }, {
    key: "expandRefs",
    value: function expandRefs(schema, recurseAllOf) {
      var _this7 = this;

      var _schema = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_28__["extend"])({}, schema);

      if (!_schema.$ref) return _schema;
      var refObj = this.refs_with_info[_schema.$ref];
      delete _schema.$ref;
      var fetchUrl = refObj.$ref.startsWith('#') ? refObj.fetchUrl : '';

      var ref = this._getRef(fetchUrl, refObj);

      if (!this.refs[ref]) {
        /* if reference not found */
        // eslint-disable-next-line no-console
        console.warn("reference:'".concat(ref, "' not found!"));
      } else if (recurseAllOf && Object(_utilities_js__WEBPACK_IMPORTED_MODULE_28__["hasOwnProperty"])(this.refs[ref], 'allOf')) {
        var allOf = this.refs[ref].allOf;
        Object.keys(allOf).forEach(function (key) {
          allOf[key] = _this7.expandRefs(allOf[key], true);
        });
      }

      return this.extendSchemas(_schema, this.expandSchema(this.refs[ref]));
    }
  }, {
    key: "expandSchema",
    value: function expandSchema(schema, fileBase) {
      var _this8 = this;

      Object.entries(this._subSchema1).forEach(function (_ref7) {
        var _ref8 = _slicedToArray(_ref7, 2),
            key = _ref8[0],
            func = _ref8[1];

        if (schema[key]) {
          func.call(_this8, schema);
        }
      });
      var extended = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_28__["extend"])({}, schema);
      Object.entries(this._subSchema2).forEach(function (_ref9) {
        var _ref10 = _slicedToArray(_ref9, 2),
            key = _ref10[0],
            func = _ref10[1];

        if (schema[key]) {
          extended = func.call(_this8, schema, extended);
        }
      });
      return this.expandRefs(extended);
    }
  }, {
    key: "_getRef",
    value: function _getRef(fetchUrl, refObj) {
      var ref = fetchUrl + refObj;
      return this.refs[ref] ? ref : fetchUrl + decodeURIComponent(refObj.$ref);
    }
  }, {
    key: "_expandSubSchema",
    value: function _expandSubSchema(subschema) {
      var _this9 = this;

      /* Array of types */
      if (Array.isArray(subschema)) return subschema.map(function (m) {
        return _typeof(m) === 'object' ? _this9.expandSchema(m) : m;
      });
      /* Schema */

      return this.expandSchema(subschema);
    }
  }, {
    key: "_getDefinitions",
    value: function _getDefinitions(schema, path) {
      var _this10 = this;

      if (schema.definitions) {
        Object.keys(schema.definitions).forEach(function (i) {
          _this10.refs[path + i] = schema.definitions[i];

          if (schema.definitions[i].definitions) {
            _this10._getDefinitions(schema.definitions[i], "".concat(path + i, "/definitions/"));
          }
        });
      }
    }
  }, {
    key: "_getExternalRefs",
    value: function _getExternalRefs(schema, fetchUrl) {
      var _this11 = this;

      var refs = {};

      var mergeRefs = function mergeRefs(newrefs) {
        return Object.keys(newrefs).forEach(function (i) {
          refs[i] = true;
        });
      };

      if (schema.$ref && _typeof(schema.$ref) !== 'object') {
        var refCounter = this.refs_prefix + this.refs_counter++;

        if (schema.$ref.substr(0, 1) !== '#' && !this.refs[schema.$ref]) {
          refs[schema.$ref] = true;
        }

        this.refs_with_info[refCounter] = {
          fetchUrl: fetchUrl,
          $ref: schema.$ref
        };
        schema.$ref = refCounter;
      }

      Object.values(schema).forEach(function (value) {
        if (!value || _typeof(value) !== 'object') return;

        if (Array.isArray(value)) {
          Object.values(value).forEach(function (e) {
            if (e && _typeof(e) === 'object') {
              mergeRefs(_this11._getExternalRefs(e, fetchUrl));
            }
          });
        } else {
          mergeRefs(_this11._getExternalRefs(value, fetchUrl));
        }
      });

      if (schema.id && typeof schema.id === 'string' && schema.id.substr(0, 4) === 'urn:') {
        this.refs[schema.id] = schema;
      } else if (schema.$id && typeof schema.$id === 'string' && schema.$id.substr(0, 4) === 'urn:') {
        this.refs[schema.$id] = schema;
      }

      return refs;
    }
  }, {
    key: "_getFileBase",
    value: function _getFileBase(location) {
      if (!location) return '/';
      var ajaxBase = this.options.ajaxBase;
      return typeof ajaxBase === 'undefined' ? this._getFileBaseFromFileLocation(location) : ajaxBase;
    }
  }, {
    key: "_getFileBaseFromFileLocation",
    value: function _getFileBaseFromFileLocation(fileLocationString) {
      var pathItems = fileLocationString.split('/');
      pathItems.pop();
      return "".concat(pathItems.join('/'), "/");
    }
  }, {
    key: "_joinUrl",
    value: function _joinUrl(url, fileBase) {
      var fetchUrl = url;

      if (url.substr(0, 7) !== 'http://' && url.substr(0, 8) !== 'https://' && url.substr(0, 5) !== 'blob:' && url.substr(0, 5) !== 'data:' && url.substr(0, 1) !== '#' && url.substr(0, 1) !== '/') {
        fetchUrl = fileBase + url;
      } // strip #fragment from URI, so json pointers resolve correctly #928


      if (fetchUrl.indexOf('#') > 0) fetchUrl = fetchUrl.substr(0, fetchUrl.indexOf('#'));
      return fetchUrl;
    }
  }, {
    key: "_isUniformResourceName",
    value: function _isUniformResourceName(uri) {
      return uri.substr(0, 4) === 'urn:';
    }
  }, {
    key: "_loadExternalRefs",
    value: function _loadExternalRefs(schema, callback, fetchUrl, fileBase) {
      var _this12 = this;

      var refs = this._getExternalRefs(schema, fetchUrl);

      var done = false;
      var waiting = 0;
      Object.keys(refs).forEach(function (uri) {
        if (_this12.refs[uri]) return;

        if (_this12._isUniformResourceName(uri)) {
          _this12.refs[uri] = 'loading';
          waiting++;
          var urnResolver = _this12.options.urn_resolver;
          var urn = uri;

          if (typeof urnResolver !== 'function') {
            // eslint-disable-next-line no-console
            console.log("No \"urn_resolver\" callback defined to resolve \"".concat(urn, "\""));
            throw new Error("Must set urn_resolver option to a callback to resolve ".concat(urn));
          } // theoretically a URN can contain a JSON pointer


          if (urn.indexOf('#') > 0) urn = urn.substr(0, urn.indexOf('#'));
          var response;

          try {
            response = urnResolver(urn, function (responseText) {
              try {
                schema = JSON.parse(responseText);
              } catch (e) {
                // eslint-disable-next-line no-console
                console.log(e);
                throw new Error("Failed to parse external ref ".concat(urn));
              }

              if (!(typeof schema === 'boolean' || _typeof(schema) === 'object') || schema === null || Array.isArray(schema)) {
                throw new Error("External ref does not contain a valid schema - ".concat(urn));
              }

              _this12.refs[uri] = schema;

              _this12._getDefinitions(schema, "".concat(urn, "#/definitions/"));

              _this12._loadExternalRefs(schema, function () {
                waiting--;

                if (done && !waiting) {
                  callback();
                }
              }, uri, '/');
            });
          } catch (e) {
            // eslint-disable-next-line no-console
            console.log(e);
            throw new Error("Failed to parse external ref ".concat(urn));
          }

          if (typeof response !== 'boolean') {
            throw new Error("External ref does not contain a valid schema - ".concat(urn));
          } else if (response !== true) {
            throw new Error("External ref did not resolve - ".concat(urn));
          }

          return;
        }

        if (!_this12.options.ajax) throw new Error("Must set ajax option to true to load external ref ".concat(uri));
        _this12.refs[uri] = 'loading';
        waiting++;

        var url = _this12._joinUrl(uri, fileBase);

        var r = new XMLHttpRequest();
        r.overrideMimeType('application/json');
        r.open('GET', url, true);
        if (_this12.options.ajaxCredentials) r.withCredentials = _this12.options.ajaxCredentials;

        r.onreadystatechange = function () {
          if (r.readyState !== 4) return;
          /* Request succeeded */

          if (r.status === 200) {
            var _schema2;

            try {
              _schema2 = JSON.parse(r.responseText);
            } catch (e) {
              // eslint-disable-next-line no-console
              console.log(e);
              throw new Error("Failed to parse external ref ".concat(url));
            }

            if (!(typeof _schema2 === 'boolean' || _typeof(_schema2) === 'object') || _schema2 === null || Array.isArray(_schema2)) {
              throw new Error("External ref does not contain a valid schema - ".concat(url));
            }

            _this12.refs[uri] = _schema2;

            var _fileBase = _this12._getFileBaseFromFileLocation(url); // add leading slash


            if (url !== uri) {
              var pathItems = url.split('/');
              url = (uri.substr(0, 1) === '/' ? '/' : '') + pathItems.pop();
            }

            _this12._getDefinitions(_schema2, "".concat(url, "#/definitions/"));

            _this12._loadExternalRefs(_schema2, function () {
              waiting--;

              if (done && !waiting) {
                callback();
              }
            }, url, _fileBase);
          } else {
            /* Request failed */
            // eslint-disable-next-line no-console
            console.log(r);
            throw new Error("Failed to fetch ref via ajax - ".concat(uri));
          }
        };

        r.send();
      });
      done = true;

      if (!waiting) {
        callback();
      }
    }
  }, {
    key: "extendSchemas",
    value: function extendSchemas(obj1, obj2) {
      var _this13 = this;

      obj1 = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_28__["extend"])({}, obj1);
      obj2 = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_28__["extend"])({}, obj2);
      var extended = {};

      var isRequiredOrDefaultProperties = function isRequiredOrDefaultProperties(prop, val) {
        return (prop === 'required' || prop === 'defaultProperties') && _typeof(val) === 'object' && Array.isArray(val);
      };

      var merge = function merge(prop, val) {
        /* Required and defaultProperties arrays should be unioned together */
        if (isRequiredOrDefaultProperties(prop, val)) {
          /* Union arrays and unique */
          extended[prop] = val.concat(obj2[prop]).reduce(function (p, c) {
            if (!p.includes(c)) p.push(c);
            return p;
          }, []);
        } else if (prop === 'type' && (typeof val === 'string' || Array.isArray(val))) {
          mergeType(val);
        } else if (_typeof(val) === 'object' && !Array.isArray(val) && val !== null) {
          /* Objects should be recursively merged */
          extended[prop] = _this13.extendSchemas(val, obj2[prop]);
        } else {
          /* Otherwise, use the first value */
          extended[prop] = val;
        }
      };

      var mergeType = function mergeType(val) {
        /* Type should be intersected and is either an array or string */

        /* Make sure we're dealing with arrays */
        if (typeof val === 'string') val = [val];
        if (typeof obj2.type === 'string') obj2.type = [obj2.type];
        /* If type is only defined in the first schema, keep it */

        if (!obj2.type || !obj2.type.length) {
          extended.type = val;
        } else {
          /* If type is defined in both schemas, do an intersect */
          extended.type = val.filter(function (n) {
            return obj2.type.includes(n);
          });
        }
        /* If there's only 1 type and it's a primitive, use a string instead of array */


        if (extended.type.length === 1 && typeof extended.type[0] === 'string') {
          extended.type = extended.type[0];
        } else if (extended.type.length === 0) {
          /* Remove the type property if it's empty */
          delete extended.type;
        }
      };

      Object.entries(obj1).forEach(function (_ref11) {
        var _ref12 = _slicedToArray(_ref11, 2),
            prop = _ref12[0],
            val = _ref12[1];

        /* If this key is also defined in obj2, merge them */
        if (typeof obj2[prop] !== 'undefined') {
          merge(prop, val);
        } else {
          /* Otherwise, just use the one in obj1 */
          extended[prop] = val;
        }
      });
      /* Properties in obj2 that aren't in obj1 */

      Object.entries(obj2).forEach(function (_ref13) {
        var _ref14 = _slicedToArray(_ref13, 2),
            prop = _ref14[0],
            val = _ref14[1];

        if (typeof obj1[prop] === 'undefined') {
          extended[prop] = val;
        }
      });
      return extended;
    }
  }]);

  return SchemaLoader;
}();

/***/ }),

/***/ "./src/style.css.js":
/*!**************************!*\
  !*** ./src/style.css.js ***!
  \**************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* eslint-disable */
/* harmony default export */ __webpack_exports__["default"] = ({
  ".je-float-right-linkholder": "float:right;margin-left:10px",
  ".je-modal": "background-color:white;border:1px%20solid%20black;box-shadow:3px%203px%20black;position:absolute;z-index:10",
  ".je-infobutton-icon": "font-size:16px;font-weight:bold;padding:0.25rem;position:relative;display:inline-block",
  ".je-infobutton-tooltip": "font-size:12px;font-weight:normal;font-family:sans-serif;visibility:hidden;background-color:rgba(50%2C%2050%2C%2050%2C%200.75);margin:0%200.25rem;color:%23fafafa;padding:0.5rem%201rem;border-radius:0.25rem;width:20rem;position:absolute",
  ".je-header": "display:inline-block",
  ".je-upload-preview img": "float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",
  ".je-checkbox": "display:inline-block;width:auto",
  ".je-checkbox-control--compact": "display:inline-block;margin-right:1rem",
  ".je-radio": "display:inline-block;width:auto",
  ".je-radio-control--compact": "display:inline-block;margin-right:1rem",
  ".je-switcher": "background-color:transparent;display:inline-block;font-style:italic;font-weight:normal;height:auto;width:auto;margin-bottom:0;margin-left:5px;padding:0%200%200%203px",
  ".je-textarea": "width:100%25;height:300px;box-sizing:border-box",
  ".je-range-control": "text-align:center",
  ".je-indented-panel": "padding-left:10px;margin-left:10px;border-left:1px%20solid%20%23ccc",
  ".je-indented-panel--top": "padding-left:10px;margin-left:10px",
  ".je-tabholder": "float:left;width:130px",
  ".je-tabholder .content": "margin-left:120px",
  ".je-tabholder--top": "margin-left:10px",
  ".je-tabholder--clear": "clear:both",
  ".je-tab": "border:1px%20solid%20%23ccc;border-width:1px%200%201px%201px;text-align:center;line-height:30px;border-radius:5px;border-bottom-right-radius:0;border-top-right-radius:0;font-weight:bold;cursor:pointer",
  ".je-tab--top": "float:left;border:1px%20solid%20%23ccc;border-width:1px%201px%200px%201px;text-align:center;line-height:30px;border-radius:5px;padding-left:5px;padding-right:5px;border-bottom-right-radius:0;border-bottom-left-radius:0;font-weight:bold;cursor:pointer",
  ".je-block-link": "display:block",
  ".je-media": "width:100%25"
});
/* eslint-enable */

/***/ }),

/***/ "./src/templates/default.js":
/*!**********************************!*\
  !*** ./src/templates/default.js ***!
  \**********************************/
/*! exports provided: defaultTemplate */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultTemplate", function() { return defaultTemplate; });
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.string.match.js */ "./node_modules/core-js/modules/es.string.match.js");
/* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.string.split.js */ "./node_modules/core-js/modules/es.string.split.js");
/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_string_trim_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.string.trim.js */ "./node_modules/core-js/modules/es.string.trim.js");
/* harmony import */ var core_js_modules_es_string_trim_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_trim_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.string.replace.js */ "./node_modules/core-js/modules/es.string.replace.js");
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_4__);





var defaultTemplate = function defaultTemplate() {
  return {
    compile: function compile(template) {
      var matches = template.match(/{{\s*([a-zA-Z0-9\-_ .]+)\s*}}/g);
      var l = matches && matches.length;
      /* Shortcut if the template contains no variables */

      if (!l) return function () {
        return template;
      };
      /* Pre-compute the search/replace functions */

      /* This drastically speeds up template execution */

      var replacements = [];

      var getReplacement = function getReplacement(i) {
        var p = matches[i].replace(/[{}]+/g, '').trim().split('.');
        var n = p.length;
        var func;

        if (n > 1) {
          var cur;

          func = function func(vars) {
            cur = vars;

            for (i = 0; i < n; i++) {
              cur = cur[p[i]];
              if (!cur) break;
            }

            return cur;
          };
        } else {
          p = p[0];

          func = function func(vars) {
            return vars[p];
          };
        }

        replacements.push({
          s: matches[i],
          r: func
        });
      };

      for (var i = 0; i < l; i++) {
        getReplacement(i);
      }
      /* The compiled function */


      return function (vars) {
        var ret = "".concat(template);
        var r;

        for (i = 0; i < l; i++) {
          r = replacements[i];
          ret = ret.replace(r.s, r.r(vars));
        }
        ret = ret.replace(/undefined\./gi, ''); // Mahara
        return ret;
      };
    }
  };
};

/***/ }),

/***/ "./src/templates/ejs.js":
/*!******************************!*\
  !*** ./src/templates/ejs.js ***!
  \******************************/
/*! exports provided: ejsTemplate */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ejsTemplate", function() { return ejsTemplate; });
var ejsTemplate = function ejsTemplate() {
  if (!window.EJS) return false;
  return {
    compile: function compile(template) {
      var compiled = new window.EJS({
        text: template
      });
      return function (context) {
        return compiled.render(context);
      };
    }
  };
};

/***/ }),

/***/ "./src/templates/handlebars.js":
/*!*************************************!*\
  !*** ./src/templates/handlebars.js ***!
  \*************************************/
/*! exports provided: handlebarsTemplate */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "handlebarsTemplate", function() { return handlebarsTemplate; });
var handlebarsTemplate = function handlebarsTemplate() {
  return window.Handlebars;
};

/***/ }),

/***/ "./src/templates/hogan.js":
/*!********************************!*\
  !*** ./src/templates/hogan.js ***!
  \********************************/
/*! exports provided: hoganTemplate */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hoganTemplate", function() { return hoganTemplate; });
var hoganTemplate = function hoganTemplate() {
  if (!window.Hogan) return false;
  return {
    compile: function compile(template) {
      var compiled = window.Hogan.compile(template);
      return function (context) {
        return compiled.render(context);
      };
    }
  };
};

/***/ }),

/***/ "./src/templates/index.js":
/*!********************************!*\
  !*** ./src/templates/index.js ***!
  \********************************/
/*! exports provided: templates */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templates", function() { return templates; });
/* harmony import */ var _default_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./default.js */ "./src/templates/default.js");
/* harmony import */ var _ejs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ejs.js */ "./src/templates/ejs.js");
/* harmony import */ var _handlebars_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./handlebars.js */ "./src/templates/handlebars.js");
/* harmony import */ var _hogan_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hogan.js */ "./src/templates/hogan.js");
/* harmony import */ var _lodash_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lodash.js */ "./src/templates/lodash.js");
/* harmony import */ var _markup_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./markup.js */ "./src/templates/markup.js");
/* harmony import */ var _mustache_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./mustache.js */ "./src/templates/mustache.js");
/* harmony import */ var _swig_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./swig.js */ "./src/templates/swig.js");
/* harmony import */ var _underscore_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./underscore.js */ "./src/templates/underscore.js");









var templates = {
  "default": _default_js__WEBPACK_IMPORTED_MODULE_0__["defaultTemplate"],
  ejs: _ejs_js__WEBPACK_IMPORTED_MODULE_1__["ejsTemplate"],
  handlebars: _handlebars_js__WEBPACK_IMPORTED_MODULE_2__["handlebarsTemplate"],
  hogan: _hogan_js__WEBPACK_IMPORTED_MODULE_3__["hoganTemplate"],
  lodash: _lodash_js__WEBPACK_IMPORTED_MODULE_4__["lodashTemplate"],
  markup: _markup_js__WEBPACK_IMPORTED_MODULE_5__["markupTemplate"],
  mustache: _mustache_js__WEBPACK_IMPORTED_MODULE_6__["mustacheTemplate"],
  swig: _swig_js__WEBPACK_IMPORTED_MODULE_7__["swigTemplate"],
  underscore: _underscore_js__WEBPACK_IMPORTED_MODULE_8__["underscoreTemplate"]
};

/***/ }),

/***/ "./src/templates/lodash.js":
/*!*********************************!*\
  !*** ./src/templates/lodash.js ***!
  \*********************************/
/*! exports provided: lodashTemplate */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lodashTemplate", function() { return lodashTemplate; });
var lodashTemplate = function lodashTemplate() {
  if (!window._) return false;
  return {
    compile: function compile(template) {
      return function (context) {
        return window._.template(template)(context);
      };
    }
  };
};

/***/ }),

/***/ "./src/templates/markup.js":
/*!*********************************!*\
  !*** ./src/templates/markup.js ***!
  \*********************************/
/*! exports provided: markupTemplate */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "markupTemplate", function() { return markupTemplate; });
var markupTemplate = function markupTemplate() {
  if (!window.Mark || !window.Mark.up) return false;
  return {
    compile: function compile(template) {
      return function (context) {
        return window.Mark.up(template, context);
      };
    }
  };
};

/***/ }),

/***/ "./src/templates/mustache.js":
/*!***********************************!*\
  !*** ./src/templates/mustache.js ***!
  \***********************************/
/*! exports provided: mustacheTemplate */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mustacheTemplate", function() { return mustacheTemplate; });
var mustacheTemplate = function mustacheTemplate() {
  if (!window.Mustache) return false;
  return {
    compile: function compile(template) {
      return function (view) {
        return window.Mustache.render(template, view);
      };
    }
  };
};

/***/ }),

/***/ "./src/templates/swig.js":
/*!*******************************!*\
  !*** ./src/templates/swig.js ***!
  \*******************************/
/*! exports provided: swigTemplate */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "swigTemplate", function() { return swigTemplate; });
var swigTemplate = function swigTemplate() {
  return window.swig;
};

/***/ }),

/***/ "./src/templates/underscore.js":
/*!*************************************!*\
  !*** ./src/templates/underscore.js ***!
  \*************************************/
/*! exports provided: underscoreTemplate */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "underscoreTemplate", function() { return underscoreTemplate; });
var underscoreTemplate = function underscoreTemplate() {
  if (!window._) return false;
  return {
    compile: function compile(template) {
      return function (context) {
        return window._.template(template)(context);
      };
    }
  };
};

/***/ }),

/***/ "./src/theme.js":
/*!**********************!*\
  !*** ./src/theme.js ***!
  \**********************/
/*! exports provided: AbstractTheme */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractTheme", function() { return AbstractTheme; });
/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.find.js */ "./node_modules/core-js/modules/es.array.find.js");
/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.values.js */ "./node_modules/core-js/modules/es.object.values.js");
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.number.constructor.js */ "./node_modules/core-js/modules/es.number.constructor.js");
/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utilities */ "./src/utilities.js");
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); return Constructor; }











var matchKey = ['matches', 'webkitMatchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector'].find(function (key) {
  return key in document.documentElement;
});
var AbstractTheme = /*#__PURE__*/function () {
  function AbstractTheme(jsoneditor) {
    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
      disable_theme_rules: false
    };

    _classCallCheck(this, AbstractTheme);

    this.jsoneditor = jsoneditor;
    Object.keys(options).forEach(function (key) {
      if (typeof jsoneditor.options[key] !== 'undefined') {
        options[key] = jsoneditor.options[key];
      }
    });
    /* Theme config options that allows changing various aspects of the output */

    this.options = options;
  }

  _createClass(AbstractTheme, [{
    key: "getContainer",
    value: function getContainer() {
      return document.createElement('div');
    }
  }, {
    key: "getFloatRightLinkHolder",
    value: function getFloatRightLinkHolder() {
      var el = document.createElement('div');
      el.classList.add('je-float-right-linkholder');
      return el;
    }
  }, {
    key: "getModal",
    value: function getModal() {
      var el = document.createElement('div');
      el.style.display = 'none';
      el.classList.add('je-modal');
      return el;
    }
  }, {
    key: "getGridContainer",
    value: function getGridContainer() {
      var el = document.createElement('div');
      return el;
    }
  }, {
    key: "getGridRow",
    value: function getGridRow() {
      var el = document.createElement('div');
      el.classList.add('row');
      return el;
    }
  }, {
    key: "getGridColumn",
    value: function getGridColumn() {
      var el = document.createElement('div');
      return el;
    }
  }, {
    key: "setGridColumnSize",
    value: function setGridColumnSize(el, size) {}
  }, {
    key: "getLink",
    value: function getLink(text) {
      var el = document.createElement('a');
      el.setAttribute('href', '#');
      el.appendChild(document.createTextNode(text));
      return el;
    }
  }, {
    key: "disableHeader",
    value: function disableHeader(header) {
      header.style.color = '#ccc';
    }
  }, {
    key: "disableLabel",
    value: function disableLabel(label) {
      label.style.color = '#ccc';
    }
  }, {
    key: "enableHeader",
    value: function enableHeader(header) {
      header.style.color = '';
    }
  }, {
    key: "enableLabel",
    value: function enableLabel(label) {
      label.style.color = '';
    }
  }, {
    key: "getInfoButton",
    value: function getInfoButton(text) {
      var icon = document.createElement('span');
      icon.innerText = 'ⓘ';
      icon.classList.add('je-infobutton-icon');
      var tooltip = document.createElement('span');
      tooltip.classList.add('je-infobutton-tooltip');
      tooltip.innerText = text;

      icon.onmouseover = function () {
        tooltip.style.visibility = 'visible';
      };

      icon.onmouseleave = function () {
        tooltip.style.visibility = 'hidden';
      };

      icon.appendChild(tooltip);
      return icon;
    }
  }, {
    key: "getFormInputLabel",
    value: function getFormInputLabel(text, req) {
      var el = document.createElement('label');
      el.appendChild(document.createTextNode(text));
      if (req) el.classList.add('required');
      return el;
    }
  }, {
    key: "getHeader",
    value: function getHeader(text, pathDepth) {
      var el = document.createElement('h3');

      if (typeof text === 'string') {
        el.textContent = text;
      } else {
        el.appendChild(text);
      }

      el.classList.add('je-header');
      return el;
    }
  }, {
    key: "getCheckbox",
    value: function getCheckbox() {
      var el = this.getFormInputField('checkbox');
      el.classList.add('je-checkbox');
      return el;
    }
  }, {
    key: "getCheckboxLabel",
    value: function getCheckboxLabel(text, req) {
      var el = document.createElement('label');
      el.appendChild(document.createTextNode("\xA0".concat(text)));
      if (req) el.classList.add('required');
      return el;
    }
  }, {
    key: "getMultiCheckboxHolder",
    value: function getMultiCheckboxHolder(controls, label, description, infoText) {
      var el = document.createElement('div');
      el.classList.add('control-group');

      if (label) {
        label.style.display = 'block';
        el.appendChild(label);
        if (infoText) label.appendChild(infoText);
      }

      Object.values(controls).forEach(function (control) {
        control.style.display = 'inline-block';
        control.style.marginRight = '20px';
        el.appendChild(control);
      });
      if (description) el.appendChild(description);
      return el;
    }
  }, {
    key: "getFormCheckboxControl",
    value: function getFormCheckboxControl(label, input, compact) {
      var el = document.createElement('div');
      el.appendChild(label);
      input.style.width = 'auto';
      label.insertBefore(input, label.firstChild);

      if (compact) {
        el.classList.add('je-checkbox-control--compact');
      }

      return el;
    }
  }, {
    key: "getFormRadio",
    value: function getFormRadio(attributes) {
      var el = this.getFormInputField('radio');
      Object.keys(attributes).forEach(function (key) {
        return el.setAttribute(key, attributes[key]);
      });
      el.classList.add('je-radio');
      return el;
    }
  }, {
    key: "getFormRadioLabel",
    value: function getFormRadioLabel(text, req) {
      var el = document.createElement('label');
      el.appendChild(document.createTextNode("\xA0".concat(text)));
      if (req) el.classList.add('required');
      return el;
    }
  }, {
    key: "getFormRadioControl",
    value: function getFormRadioControl(label, input, compact) {
      var el = document.createElement('div');
      el.appendChild(label);
      input.style.width = 'auto';
      label.insertBefore(input, label.firstChild);

      if (compact) {
        el.classList.add('je-radio-control--compact');
      }

      return el;
    }
  }, {
    key: "getSelectInput",
    value: function getSelectInput(options, multiple) {
      var select = document.createElement('select');
      if (options) this.setSelectOptions(select, options);
      return select;
    }
  }, {
    key: "getSwitcher",
    value: function getSwitcher(options) {
      var switcher = this.getSelectInput(options, false);
      switcher.classList.add('je-switcher');
      return switcher;
    }
  }, {
    key: "getSwitcherOptions",
    value: function getSwitcherOptions(switcher) {
      return switcher.getElementsByTagName('option');
    }
  }, {
    key: "setSwitcherOptions",
    value: function setSwitcherOptions(switcher, options, titles) {
      this.setSelectOptions(switcher, options, titles);
    }
  }, {
    key: "setSelectOptions",
    value: function setSelectOptions(select, options) {
      var titles = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
      select.innerHTML = '';

      for (var i = 0; i < options.length; i++) {
        var option = document.createElement('option');
        option.setAttribute('value', options[i]);
        option.textContent = titles[i] || options[i];
        select.appendChild(option);
      }
    }
  }, {
    key: "getTextareaInput",
    value: function getTextareaInput() {
      var el = document.createElement('textarea');
      el.classList.add('je-textarea');
      return el;
    }
  }, {
    key: "getRangeInput",
    value: function getRangeInput(min, max, step) {
      var el = this.getFormInputField('range');
      el.setAttribute('min', min);
      el.setAttribute('max', max);
      el.setAttribute('step', step);
      return el;
    }
  }, {
    key: "getStepperButtons",
    value: function getStepperButtons(input) {
      var div = document.createElement('div');
      var minusBtn = document.createElement('button');
      minusBtn.setAttribute('type', 'button');
      minusBtn.classList.add('stepper-down');
      var plusBtn = document.createElement('button');
      plusBtn.setAttribute('type', 'button');
      plusBtn.classList.add('stepper-up');
      var readonly = input.getAttribute('readonly');

      if (readonly) {
        minusBtn.setAttribute('disabled', true);
        plusBtn.setAttribute('disabled', true);
      }

      minusBtn.textContent = '-';
      plusBtn.textContent = '+';

      var initialize = function initialize(input, min) {
        if (min) {
          input.value = Number(min);
        } else {
          input.value = Number(input.value);
        }

        input.setAttribute('initialized', '1');
      };

      var min = input.getAttribute('min');
      var max = input.getAttribute('max');
      minusBtn.addEventListener('click', function () {
        if (!input.getAttribute('initialized')) {
          initialize(input, min);
        } else if (min) {
          if (Number(input.value) > Number(min)) {
            input.stepDown();
          }
        } else {
          input.stepDown();
        }

        Object(_utilities__WEBPACK_IMPORTED_MODULE_9__["trigger"])(input, 'change');
      });
      plusBtn.addEventListener('click', function () {
        if (!input.getAttribute('initialized')) {
          initialize(input, min);
        } else if (max) {
          if (Number(input.value) < Number(max)) {
            input.stepUp();
          }
        } else {
          input.stepUp();
        }

        Object(_utilities__WEBPACK_IMPORTED_MODULE_9__["trigger"])(input, 'change');
      });
      div.appendChild(minusBtn);
      div.appendChild(plusBtn);
      return div;
    }
  }, {
    key: "getRangeOutput",
    value: function getRangeOutput(input, startvalue) {
      var output = document.createElement('output');
      output.value = startvalue || 0;

      var updateOutput = function updateOutput(e) {
        output.value = e.currentTarget.value;
      };

      input.addEventListener('change', updateOutput, false);
      input.addEventListener('input', updateOutput, false);
      return output;
    }
  }, {
    key: "getRangeControl",
    value: function getRangeControl(input, output) {
      var el = document.createElement('div');
      el.classList.add('je-range-control');
      if (output) el.appendChild(output);
      el.appendChild(input);
      return el;
    }
  }, {
    key: "getFormInputField",
    value: function getFormInputField(type) {
      var el = document.createElement('input');
      el.setAttribute('type', type);
      return el;
    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady(input) {}
  }, {
    key: "getFormControl",
    value: function getFormControl(label, input, description, infoText, formName) {
      var el = document.createElement('div');
      el.classList.add('form-control');

      if (label) {
        el.appendChild(label);
        if (formName) label.setAttribute('for', formName);
      }

      if ((input.type === 'checkbox' || input.type === 'radio') && label) {
        input.style.width = 'auto';
        label.insertBefore(input, label.firstChild);
        if (infoText) label.appendChild(infoText);
      } else {
        if (infoText && label) label.appendChild(infoText);
        el.appendChild(input);
      }

      if (description) el.appendChild(description);
      return el;
    }
  }, {
    key: "getIndentedPanel",
    value: function getIndentedPanel() {
      var el = document.createElement('div');
      el.classList.add('je-indented-panel');
      return el;
    }
  }, {
    key: "getTopIndentedPanel",
    value: function getTopIndentedPanel() {
      var el = document.createElement('div');
      el.classList.add('je-indented-panel--top');
      return el;
    }
  }, {
    key: "getChildEditorHolder",
    value: function getChildEditorHolder() {
      return document.createElement('div');
    }
  }, {
    key: "getDescription",
    value: function getDescription(text) {
      var el = document.createElement('p');
      if (window.DOMPurify) el.innerHTML = window.DOMPurify.sanitize(text);else el.textContent = this.cleanText(text);
      return el;
    }
  }, {
    key: "getCheckboxDescription",
    value: function getCheckboxDescription(text) {
      return this.getDescription(text);
    }
  }, {
    key: "getFormInputDescription",
    value: function getFormInputDescription(text) {
      return this.getDescription(text);
    }
  }, {
    key: "getButtonHolder",
    value: function getButtonHolder() {
      return document.createElement('span');
    }
  }, {
    key: "getHeaderButtonHolder",
    value: function getHeaderButtonHolder() {
      return this.getButtonHolder();
    }
  }, {
    key: "getFormButtonHolder",
    value: function getFormButtonHolder(buttonAlign) {
      return this.getButtonHolder();
    }
  }, {
    key: "getButton",
    value: function getButton(text, icon, title) {
      var el = document.createElement('button');
      el.type = 'button';
      this.setButtonText(el, text, icon, title);
      return el;
    }
  }, {
    key: "getFormButton",
    value: function getFormButton(text, icon, title) {
      return this.getButton(text, icon, title);
    }
  }, {
    key: "setButtonText",
    value: function setButtonText(button, text, icon, title) {
      button.setAttribute('aria-label', title); // Mahara
      /* Clear previous contents. https://jsperf.com/innerhtml-vs-removechild/37 */
      while (button.firstChild) {
        button.removeChild(button.firstChild);
      }

      if (icon) {
        button.appendChild(icon);
        text = " ".concat(text);
      }

      if (!this.jsoneditor.options.iconlib || !this.jsoneditor.options.remove_button_labels || !icon) {
        var spanEl = document.createElement('span');
        spanEl.appendChild(document.createTextNode(text));
        button.appendChild(spanEl);
      }

      // if (title) button.setAttribute('title', title); // Mahara

    }
    /* Table functions */

  }, {
    key: "getTable",
    value: function getTable() {
      return document.createElement('table');
    }
  }, {
    key: "getTableRow",
    value: function getTableRow() {
      return document.createElement('tr');
    }
  }, {
    key: "getTableHead",
    value: function getTableHead() {
      return document.createElement('thead');
    }
  }, {
    key: "getTableBody",
    value: function getTableBody() {
      return document.createElement('tbody');
    }
  }, {
    key: "getTableHeaderCell",
    value: function getTableHeaderCell(text) {
      var el = document.createElement('th');
      el.textContent = text;
      return el;
    }
  }, {
    key: "getTableCell",
    value: function getTableCell() {
      var el = document.createElement('td');
      return el;
    }
  }, {
    key: "getErrorMessage",
    value: function getErrorMessage(text) {
      var el = document.createElement('p');
      el.style = el.style || {};
      el.style.color = 'red';
      el.appendChild(document.createTextNode(text));
      return el;
    }
  }, {
    key: "addInputError",
    value: function addInputError(input, text) {}
  }, {
    key: "removeInputError",
    value: function removeInputError(input) {}
  }, {
    key: "addTableRowError",
    value: function addTableRowError(row) {}
  }, {
    key: "removeTableRowError",
    value: function removeTableRowError(row) {}
  }, {
    key: "getTabHolder",
    value: function getTabHolder(propertyName) {
      var pName = typeof propertyName === 'undefined' ? '' : propertyName;
      var el = document.createElement('div');
      el.innerHTML = "<div class='je-tabholder tabs'></div><div class='content' id='".concat(pName, "'></div><div class='je-tabholder--clear'></div>");
      return el;
    }
  }, {
    key: "getTopTabHolder",
    value: function getTopTabHolder(propertyName) {
      var pName = typeof propertyName === 'undefined' ? '' : propertyName;
      var el = document.createElement('div');
      el.innerHTML = "<div class='tabs je-tabholder--top'></div><div class='je-tabholder--clear'></div><div class='content' id='".concat(pName, "'></div>");
      return el;
    }
  }, {
    key: "applyStyles",
    value: function applyStyles(el, styles) {
      Object.keys(styles).forEach(function (i) {
        return el.style[i] = styles[i];
      });
    }
  }, {
    key: "closest",
    value: function closest(elem, selector) {
      while (elem && elem !== document) {
        if (elem[matchKey]) {
          if (elem[matchKey](selector)) {
            return elem;
          } else {
            elem = elem.parentNode;
          }
        } else {
          return false;
        }
      }

      return false;
    }
  }, {
    key: "insertBasicTopTab",
    value: function insertBasicTopTab(tab, newTabsHolder) {
      newTabsHolder.firstChild.insertBefore(tab, newTabsHolder.firstChild.firstChild);
    }
  }, {
    key: "getTab",
    value: function getTab(span, tabId) {
      var el = document.createElement('div');
      el.appendChild(span);
      el.id = tabId;
      el.classList.add('je-tab');
      return el;
    }
  }, {
    key: "getTopTab",
    value: function getTopTab(span, tabId) {
      var el = document.createElement('div');
      el.appendChild(span);
      el.id = tabId;
      el.classList.add('je-tab--top');
      return el;
    }
  }, {
    key: "getTabContentHolder",
    value: function getTabContentHolder(tabHolder) {
      return tabHolder.children[1];
    }
  }, {
    key: "getTopTabContentHolder",
    value: function getTopTabContentHolder(tabHolder) {
      return tabHolder.children[1];
    }
  }, {
    key: "getTabContent",
    value: function getTabContent() {
      return this.getIndentedPanel();
    }
  }, {
    key: "getTopTabContent",
    value: function getTopTabContent() {
      return this.getTopIndentedPanel();
    }
  }, {
    key: "markTabActive",
    value: function markTabActive(row) {
      this.applyStyles(row.tab, {
        opacity: 1,
        background: 'white'
      });

      if (typeof row.rowPane !== 'undefined') {
        row.rowPane.style.display = '';
      } else {
        row.container.style.display = '';
      }
    }
  }, {
    key: "markTabInactive",
    value: function markTabInactive(row) {
      this.applyStyles(row.tab, {
        opacity: 0.5,
        background: ''
      });

      if (typeof row.rowPane !== 'undefined') {
        row.rowPane.style.display = 'none';
      } else {
        row.container.style.display = 'none';
      }
    }
  }, {
    key: "addTab",
    value: function addTab(holder, tab) {
      holder.children[0].appendChild(tab);
    }
  }, {
    key: "addTopTab",
    value: function addTopTab(holder, tab) {
      holder.children[0].appendChild(tab);
    }
  }, {
    key: "getBlockLink",
    value: function getBlockLink() {
      var link = document.createElement('a');
      link.classList.add('je-block-link');
      return link;
    }
  }, {
    key: "getBlockLinkHolder",
    value: function getBlockLinkHolder() {
      var el = document.createElement('div');
      return el;
    }
  }, {
    key: "getLinksHolder",
    value: function getLinksHolder() {
      var el = document.createElement('div');
      return el;
    }
  }, {
    key: "createMediaLink",
    value: function createMediaLink(holder, link, media) {
      holder.appendChild(link);
      media.classList.add('je-media');
      holder.appendChild(media);
    }
  }, {
    key: "createImageLink",
    value: function createImageLink(holder, link, image) {
      holder.appendChild(link);
      link.appendChild(image);
    }
  }, {
    key: "getFirstTab",
    value: function getFirstTab(holder) {
      return holder.firstChild.firstChild;
    }
  }, {
    key: "getInputGroup",
    value: function getInputGroup(input, buttons) {
      return undefined;
    }
  }, {
    key: "cleanText",
    value: function cleanText(txt) {
      /* Clean out HTML tags from txt */
      var tmp = document.createElement('div');
      tmp.innerHTML = txt;
      return tmp.textContent || tmp.innerText;
    }
  }, {
    key: "getDropZone",
    value: function getDropZone(text) {
      var el = document.createElement('div');
      el.setAttribute('data-text', text);
      el.classList.add('je-dropzone');
      return el;
    }
    /* file is an object with properties: name, type, mimeType, size amd formattedSize */

  }, {
    key: "getUploadPreview",
    value: function getUploadPreview(file, uploadButton, data) {
      var preview = document.createElement('div');
      preview.classList.add('je-upload-preview');

      if (file.mimeType.substr(0, 5) === 'image') {
        var img = document.createElement('img');
        img.src = data;
        preview.appendChild(img);
      }

      var info = document.createElement('div');
      info.innerHTML += "<strong>Name:</strong> ".concat(file.name, "<br><strong>Type:</strong> ").concat(file.type, "<br><strong>Size:</strong> ").concat(file.formattedSize);
      preview.appendChild(info);
      preview.appendChild(uploadButton);
      var clear = document.createElement('div');
      clear.style.clear = 'left';
      preview.appendChild(clear);
      return preview;
    }
  }, {
    key: "getProgressBar",
    value: function getProgressBar() {
      var max = 100;
      var start = 0;
      var progressBar = document.createElement('progress');
      progressBar.setAttribute('max', max);
      progressBar.setAttribute('value', start);
      return progressBar;
    }
  }, {
    key: "updateProgressBar",
    value: function updateProgressBar(progressBar, progress) {
      if (!progressBar) return;
      progressBar.setAttribute('value', progress);
    }
  }, {
    key: "updateProgressBarUnknown",
    value: function updateProgressBarUnknown(progressBar) {
      if (!progressBar) return;
      progressBar.removeAttribute('value');
    }
  }]);

  return AbstractTheme;
}();

/***/ }),

/***/ "./src/themes/barebones.css.js":
/*!*************************************!*\
  !*** ./src/themes/barebones.css.js ***!
  \*************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* eslint-disable */
/* harmony default export */ __webpack_exports__["default"] = ({
  ".je-upload-preview img": "float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",
  ".je-dropzone": "position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",
  ".je-dropzone:before": "position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",
  ".je-dropzone.valid-dropzone": "background:green",
  ".je-dropzone.invalid-dropzone": "background:red"
});
/* eslint-enable */

/***/ }),

/***/ "./src/themes/barebones.js":
/*!*********************************!*\
  !*** ./src/themes/barebones.js ***!
  \*********************************/
/*! exports provided: barebonesTheme */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "barebonesTheme", function() { return barebonesTheme; });
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var _theme_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../theme.js */ "./src/theme.js");
/* harmony import */ var _barebones_css_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./barebones.css.js */ "./src/themes/barebones.css.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }














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); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var barebonesTheme = /*#__PURE__*/function (_AbstractTheme) {
  _inherits(barebonesTheme, _AbstractTheme);

  var _super = _createSuper(barebonesTheme);

  function barebonesTheme() {
    _classCallCheck(this, barebonesTheme);

    return _super.apply(this, arguments);
  }

  _createClass(barebonesTheme, [{
    key: "addInputError",
    value: function addInputError(input, text) {
      if (!input.errmsg) {
        var group = this.closest(input, '.form-control');
        input.errmsg = document.createElement('div');
        input.errmsg.setAttribute('class', 'errmsg');
        group.appendChild(input.errmsg);
      } else {
        input.errmsg.style.display = 'block';
      }

      input.errmsg.innerHTML = '';
      input.errmsg.appendChild(document.createTextNode(text));
    }
  }, {
    key: "removeInputError",
    value: function removeInputError(input) {
      if (input.style) {
        input.style.borderColor = '';
      }

      if (input.errmsg) input.errmsg.style.display = 'none';
    }
  }]);

  return barebonesTheme;
}(_theme_js__WEBPACK_IMPORTED_MODULE_12__["AbstractTheme"]);
/* Custom stylesheet rules. format: "selector" : "CSS rules" */

barebonesTheme.rules = _barebones_css_js__WEBPACK_IMPORTED_MODULE_13__["default"];

/***/ }),

/***/ "./src/themes/bootstrap3.css":
/*!***********************************!*\
  !*** ./src/themes/bootstrap3.css ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports) {



/***/ }),

/***/ "./src/themes/bootstrap3.js":
/*!**********************************!*\
  !*** ./src/themes/bootstrap3.js ***!
  \**********************************/
/*! exports provided: bootstrap3Theme */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bootstrap3Theme", function() { return bootstrap3Theme; });
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var _theme_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../theme.js */ "./src/theme.js");
/* harmony import */ var _bootstrap3_css__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./bootstrap3.css */ "./src/themes/bootstrap3.css");
/* harmony import */ var _bootstrap3_css__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_bootstrap3_css__WEBPACK_IMPORTED_MODULE_16__);
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var bootstrap3Theme = /*#__PURE__*/function (_AbstractTheme) {
  _inherits(bootstrap3Theme, _AbstractTheme);

  var _super = _createSuper(bootstrap3Theme);

  function bootstrap3Theme() {
    _classCallCheck(this, bootstrap3Theme);

    return _super.apply(this, arguments);
  }

  _createClass(bootstrap3Theme, [{
    key: "getSelectInput",
    value: function getSelectInput(options, multiple) {
      var el = _get(_getPrototypeOf(bootstrap3Theme.prototype), "getSelectInput", this).call(this, options);

      el.classList.add('form-control');
      /* el.style.width = 'auto'; */

      return el;
    }
  }, {
    key: "setGridColumnSize",
    value: function setGridColumnSize(el, size, offset) {
      el.classList.add("col-md-".concat(size));

      if (offset) {
        el.classList.add("col-md-offset-".concat(offset));
      }
    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady(input) {
      if (input.controlgroup) return;
      input.controlgroup = this.closest(input, '.form-group');

      if (this.closest(input, '.compact')) {
        input.controlgroup.style.marginBottom = 0;
      }

      if (this.queuedInputErrorText) {
        var text = this.queuedInputErrorText;
        delete this.queuedInputErrorText;
        this.addInputError(input, text);
      }
      /* TODO: use bootstrap slider */

    }
  }, {
    key: "getTextareaInput",
    value: function getTextareaInput() {
      var el = document.createElement('textarea');
      el.classList.add('form-control');
      return el;
    }
  }, {
    key: "getRangeInput",
    value: function getRangeInput(min, max, step) {
      /* TODO: use better slider */
      return _get(_getPrototypeOf(bootstrap3Theme.prototype), "getRangeInput", this).call(this, min, max, step);
    }
  }, {
    key: "getFormInputField",
    value: function getFormInputField(type) {
      var el = _get(_getPrototypeOf(bootstrap3Theme.prototype), "getFormInputField", this).call(this, type);

      if (type !== 'checkbox' && type !== 'radio') {
        el.classList.add('form-control');
      }

      return el;
    }
  }, {
    key: "getFormControl",
    value: function getFormControl(label, input, description, infoText) {
      var group = document.createElement('div');

      if (label && (input.type === 'checkbox' || input.type === 'radio')) {
        group.classList.add(input.type);
        label.insertBefore(input, label.firstChild);
        group.appendChild(label);
      } else {
        group.classList.add('form-group');

        if (label) {
          label.classList.add('control-label');
          group.appendChild(label);
          if (infoText) label.appendChild(infoText);
        }

        group.appendChild(input);
      }

      if (description) group.appendChild(description);
      return group;
    }
  }, {
    key: "getIndentedPanel",
    value: function getIndentedPanel() {
      var el = document.createElement('div');
      el.classList.add('well', 'well-sm');
      el.style.paddingBottom = 0;
      return el;
    }
  }, {
    key: "getInfoButton",
    value: function getInfoButton(text) {
      var icon = document.createElement('span');
      icon.classList.add('glyphicon', 'glyphicon-info-sign', 'pull-right');
      icon.style.padding = '.25rem';
      icon.style.position = 'relative';
      icon.style.display = 'inline-block';
      var tooltip = document.createElement('span');
      tooltip.style['font-family'] = 'sans-serif';
      tooltip.style.visibility = 'hidden';
      tooltip.style['background-color'] = 'rgba(50, 50, 50, .75)';
      tooltip.style.margin = '0 .25rem';
      tooltip.style.color = '#FAFAFA';
      tooltip.style.padding = '.5rem 1rem';
      tooltip.style['border-radius'] = '.25rem';
      tooltip.style.width = '25rem';
      tooltip.style.position = 'absolute';
      tooltip.innerText = text;

      icon.onmouseover = function () {
        tooltip.style.visibility = 'visible';
      };

      icon.onmouseleave = function () {
        tooltip.style.visibility = 'hidden';
      };

      icon.appendChild(tooltip);
      return icon;
    }
  }, {
    key: "getFormInputDescription",
    value: function getFormInputDescription(text) {
      var el = document.createElement('p');
      el.classList.add('help-block');
      if (window.DOMPurify) el.innerHTML = window.DOMPurify.sanitize(text);else el.textContent = this.cleanText(text);
      return el;
    }
  }, {
    key: "getHeaderButtonHolder",
    value: function getHeaderButtonHolder() {
      var el = this.getButtonHolder();
      el.style.marginLeft = '10px';
      return el;
    }
  }, {
    key: "getButtonHolder",
    value: function getButtonHolder() {
      var el = document.createElement('span');
      el.classList.add('btn-group');
      return el;
    }
  }, {
    key: "getButton",
    value: function getButton(text, icon, title) {
      var el = _get(_getPrototypeOf(bootstrap3Theme.prototype), "getButton", this).call(this, text, icon, title);

      el.classList.add('btn', 'btn-default');
      return el;
    }
  }, {
    key: "getTable",
    value: function getTable() {
      var el = document.createElement('table');
      el.classList.add('table', 'table-bordered');
      el.style.width = 'auto';
      el.style.maxWidth = 'none';
      return el;
    }
  }, {
    key: "addInputError",
    value: function addInputError(input, text) {
      if (!input.controlgroup) {
        this.queuedInputErrorText = text;
        return;
      }

      input.controlgroup.classList.add('has-error');

      if (!input.errmsg) {
        input.errmsg = document.createElement('p');
        input.errmsg.classList.add('help-block', 'errormsg');
        input.controlgroup.appendChild(input.errmsg);
      } else {
        input.errmsg.style.display = '';
      }

      input.errmsg.textContent = text;
    }
  }, {
    key: "removeInputError",
    value: function removeInputError(input) {
      if (!input.controlgroup) {
        delete this.queuedInputErrorText;
      }

      if (!input.errmsg) return;
      input.errmsg.style.display = 'none';
      input.controlgroup.classList.remove('has-error');
    }
  }, {
    key: "getTabHolder",
    value: function getTabHolder(propertyName) {
      var pName = typeof propertyName === 'undefined' ? '' : propertyName;
      var el = document.createElement('div');
      el.innerHTML = "<ul class='col-md-2 nav nav-pills nav-stacked' id='".concat(pName, "' role='tablist'></ul><div class='col-md-10 tab-content active well well-small'  id='").concat(pName, "'></div>");
      return el;
    }
  }, {
    key: "getTopTabHolder",
    value: function getTopTabHolder(propertyName) {
      var pName = typeof propertyName === 'undefined' ? '' : propertyName;
      var el = document.createElement('div');
      el.innerHTML = "<ul class='nav nav-tabs' id='".concat(pName, "' role='tablist'></ul><div class='tab-content active well well-small'  id='").concat(pName, "'></div>");
      return el;
    }
  }, {
    key: "getTab",
    value: function getTab(text, tabId) {
      var li = document.createElement('li');
      li.setAttribute('role', 'presentation');
      var a = document.createElement('a');
      a.setAttribute('href', "#".concat(tabId));
      a.appendChild(text);
      a.setAttribute('aria-controls', tabId);
      a.setAttribute('role', 'tab');
      a.setAttribute('data-toggle', 'tab');
      li.appendChild(a);
      return li;
    }
  }, {
    key: "getTopTab",
    value: function getTopTab(text, tabId) {
      var li = document.createElement('li');
      li.setAttribute('role', 'presentation');
      var a = document.createElement('a');
      a.setAttribute('href', "#".concat(tabId));
      a.appendChild(text);
      a.setAttribute('aria-controls', tabId);
      a.setAttribute('role', 'tab');
      a.setAttribute('data-toggle', 'tab');
      li.appendChild(a);
      return li;
    }
  }, {
    key: "getTabContent",
    value: function getTabContent() {
      var el = document.createElement('div');
      el.classList.add('tab-pane');
      el.setAttribute('role', 'tabpanel');
      return el;
    }
  }, {
    key: "getTopTabContent",
    value: function getTopTabContent() {
      var el = document.createElement('div');
      el.classList.add('tab-pane');
      el.setAttribute('role', 'tabpanel');
      return el;
    }
  }, {
    key: "markTabActive",
    value: function markTabActive(row) {
      row.tab.classList.add('active');

      if (typeof row.rowPane !== 'undefined') {
        row.rowPane.classList.add('active');
      } else {
        row.container.classList.add('active');
      }
    }
  }, {
    key: "markTabInactive",
    value: function markTabInactive(row) {
      row.tab.classList.remove('active');

      if (typeof row.rowPane !== 'undefined') {
        row.rowPane.classList.remove('active');
      } else {
        row.container.classList.remove('active');
      }
    }
  }, {
    key: "getProgressBar",
    value: function getProgressBar() {
      var min = 0;
      var max = 100;
      var start = 0;
      var container = document.createElement('div');
      container.classList.add('progress');
      var bar = document.createElement('div');
      bar.classList.add('progress-bar');
      bar.setAttribute('role', 'progressbar');
      bar.setAttribute('aria-valuenow', start);
      bar.setAttribute('aria-valuemin', min);
      bar.setAttribute('aria-valuenax', max);
      bar.innerHTML = "".concat(start, "%");
      container.appendChild(bar);
      return container;
    }
  }, {
    key: "updateProgressBar",
    value: function updateProgressBar(progressBar, progress) {
      if (!progressBar) return;
      var bar = progressBar.firstChild;
      var percentage = "".concat(progress, "%");
      bar.setAttribute('aria-valuenow', progress);
      bar.style.width = percentage;
      bar.innerHTML = percentage;
    }
  }, {
    key: "updateProgressBarUnknown",
    value: function updateProgressBarUnknown(progressBar) {
      if (!progressBar) return;
      var bar = progressBar.firstChild;
      progressBar.classList.add('progress', 'progress-striped', 'active');
      bar.removeAttribute('aria-valuenow');
      bar.style.width = '100%';
      bar.innerHTML = '';
    }
  }, {
    key: "getInputGroup",
    value: function getInputGroup(input, buttons) {
      if (!input) return;
      var inputGroupContainer = document.createElement('div');
      inputGroupContainer.classList.add('input-group');
      inputGroupContainer.appendChild(input);
      var inputGroup = document.createElement('div');
      inputGroup.classList.add('input-group-btn');
      inputGroupContainer.appendChild(inputGroup);

      for (var i = 0; i < buttons.length; i++) {
        inputGroup.appendChild(buttons[i]);
      }

      return inputGroupContainer;
    }
  }]);

  return bootstrap3Theme;
}(_theme_js__WEBPACK_IMPORTED_MODULE_15__["AbstractTheme"]);
/* Custom stylesheet rules. format: "selector" : "CSS rules" */

bootstrap3Theme.rules = _bootstrap3_css__WEBPACK_IMPORTED_MODULE_16___default.a;

/***/ }),

/***/ "./src/themes/bootstrap4.css.js":
/*!**************************************!*\
  !*** ./src/themes/bootstrap4.css.js ***!
  \**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* eslint-disable */
/* harmony default export */ __webpack_exports__["default"] = ({
  ".jsoneditor-twbs4-text-button": "background:none;padding:0;border:0;color:currentColor",
  "td > .form-group": "margin-bottom:0",
  ".json-editor-btn-upload": "margin-top:1rem",
  ".je-noindent .card": "padding:0;border:0",
  ".je-tooltip:hover::before": "display:block;position:absolute;font-size:0.8em;color:%23fff;border-radius:0.2em;content:attr(title);background-color:%23000;margin-top:-2.5em;padding:0.3em",
  ".je-tooltip:hover::after": "display:block;position:absolute;font-size:0.8em;color:%23fff",
  ".select2-container--default .select2-selection--single": "height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",
  ".select2-container--default   .select2-selection--single   .select2-selection__arrow": "height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",
  ".select2-container--default   .select2-selection--single   .select2-selection__rendered": "line-height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",
  ".selectize-control.form-control": "padding:0",
  ".selectize-dropdown.form-control": "padding:0;height:auto",
  ".je-upload-preview img": "float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",
  ".je-dropzone": "position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",
  ".je-dropzone:before": "position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",
  ".je-dropzone.valid-dropzone": "background:green",
  ".je-dropzone.invalid-dropzone": "background:red"
});
/* eslint-enable */

/***/ }),

/***/ "./src/themes/bootstrap4.js":
/*!**********************************!*\
  !*** ./src/themes/bootstrap4.js ***!
  \**********************************/
/*! exports provided: bootstrap4Theme */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bootstrap4Theme", function() { return bootstrap4Theme; });
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.number.constructor.js */ "./node_modules/core-js/modules/es.number.constructor.js");
/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.number.to-fixed.js */ "./node_modules/core-js/modules/es.number.to-fixed.js");
/* harmony import */ var core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_date_now_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.date.now.js */ "./node_modules/core-js/modules/es.date.now.js");
/* harmony import */ var core_js_modules_es_date_now_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_date_now_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.date.to-string.js */ "./node_modules/core-js/modules/es.date.to-string.js");
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.values.js */ "./node_modules/core-js/modules/es.object.values.js");
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_19__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_20__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_21__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_22__);
/* harmony import */ var _theme_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../theme.js */ "./src/theme.js");
/* harmony import */ var _bootstrap4_css_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./bootstrap4.css.js */ "./src/themes/bootstrap4.css.js");
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../utilities */ "./src/utilities.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

























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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }




/* Theme config options that allows changing various aspects of the output */

var options = {
  disable_theme_rules: false,
  input_size: 'normal',

  /* Size of input and select elements. "small", "normal", "large" */
  custom_forms: false,

  /* use twbs custom form stylings */
  object_indent: true,

  /* Indent nested object elements (use nested .card layout) */
  object_background: 'bg-light',

  /* Bootstrap 4 card background modifier class (https://getbootstrap.com/docs/4.1/getting-started/introduction/) */
  object_text: '',

  /* Bootstrap 4 card tect color modifier class (https://getbootstrap.com/docs/4.1/getting-started/introduction/) */
  table_border: false,

  /* Add border to array "table" row and cells */
  table_zebrastyle: false,

  /* Add "zebra style" to array "table" rows */
  tooltip: 'bootstrap'
  /* how to display tooltips (infoText). Can be `browser` for native `title`, `css` for simple CSS Styling, or `bootstrap` for TWBS/Popper.js handling */

};
var bootstrap4Theme = /*#__PURE__*/function (_AbstractTheme) {
  _inherits(bootstrap4Theme, _AbstractTheme);

  var _super = _createSuper(bootstrap4Theme);

  function bootstrap4Theme(jsoneditor) {
    _classCallCheck(this, bootstrap4Theme);

    return _super.call(this, jsoneditor, options);
  }

  _createClass(bootstrap4Theme, [{
    key: "getSelectInput",
    value: function getSelectInput(options, multiple) {
      var el = _get(_getPrototypeOf(bootstrap4Theme.prototype), "getSelectInput", this).call(this, options);

      el.classList.add('form-control');

      if (this.options.custom_forms === false) {
        if (this.options.input_size === 'small') el.classList.add('form-control-sm');
        if (this.options.input_size === 'large') el.classList.add('form-control-lg');
      } else {
        el.classList.remove('form-control');
        el.classList.add('custom-select');
        if (this.options.input_size === 'small') el.classList.add('custom-select-sm');
        if (this.options.input_size === 'large') el.classList.add('custom-select-lg');
      }

      return el;
    }
  }, {
    key: "getContainer",
    value: function getContainer() {
      var el = document.createElement('div');
      if (!this.options.object_indent) el.classList.add('je-noindent');
      return el;
    }
  }, {
    key: "setGridColumnSize",
    value: function setGridColumnSize(el, size, offset) {
      el.classList.add("col-md-".concat(size));

      if (offset) {
        el.classList.add("offset-md-".concat(offset));
      }
    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady(input) {
      if (input.controlgroup) return;
      /* set id/for */

      /* is not working for: [type=file], [type=checkbox] */

      var id = input.name;
      input.id = id;
      /* 2x parentNode, b/c range input has an <div> wrapper */

      var label = input.parentNode.parentNode.getElementsByTagName('label')[0];

      if (label) {
        label.htmlFor = id;
      }

      input.controlgroup = this.closest(input, '.form-group');
    }
  }, {
    key: "getTextareaInput",
    value: function getTextareaInput() {
      var el = document.createElement('textarea');
      el.classList.add('form-control');
      if (this.options.input_size === 'small') el.classList.add('form-control-sm');
      if (this.options.input_size === 'large') el.classList.add('form-control-lg');
      return el;
    }
  }, {
    key: "getRangeInput",
    value: function getRangeInput(min, max, step) {
      var el = _get(_getPrototypeOf(bootstrap4Theme.prototype), "getRangeInput", this).call(this, min, max, step);

      if (this.options.custom_forms === true) {
        el.classList.remove('form-control');
        el.classList.add('custom-range');
      }

      return el;
    }
  }, {
    key: "getStepperButtons",
    value: function getStepperButtons(input) {
      var inputGroup = document.createElement('div');
      var prepend = document.createElement('div');
      var append = document.createElement('div');
      var minusBtn = document.createElement('button');
      minusBtn.setAttribute('type', 'button');
      var plusBtn = document.createElement('button');
      plusBtn.setAttribute('type', 'button');
      inputGroup.appendChild(prepend);
      inputGroup.appendChild(input);
      inputGroup.appendChild(append);
      prepend.appendChild(minusBtn);
      append.appendChild(plusBtn);
      inputGroup.classList.add('input-group');
      prepend.classList.add('input-group-prepend');
      append.classList.add('input-group-append');
      minusBtn.classList.add('btn');
      minusBtn.classList.add('btn-secondary');
      minusBtn.classList.add('stepper-down');
      plusBtn.classList.add('btn');
      plusBtn.classList.add('btn-secondary');
      plusBtn.classList.add('stepper-up');
      var readonly = input.getAttribute('readonly');

      if (readonly) {
        minusBtn.setAttribute('disabled', true);
        plusBtn.setAttribute('disabled', true);
      }

      minusBtn.textContent = '-';
      plusBtn.textContent = '+';

      var initialize = function initialize(input, min) {
        if (min) {
          input.value = Number(min);
        } else {
          input.value = Number(input.value);
        }

        input.setAttribute('initialized', '1');
      };

      var min = input.getAttribute('min');
      var max = input.getAttribute('max');
      input.addEventListener('change', function () {
        if (!input.getAttribute('initialized')) {
          input.setAttribute('initialized', '1');
        }
      });
      minusBtn.addEventListener('click', function () {
        if (!input.getAttribute('initialized')) {
          initialize(input, min);
        } else if (min) {
          if (Number(input.value) > Number(min)) {
            input.stepDown();
          }
        } else {
          input.stepDown();
        }

        Object(_utilities__WEBPACK_IMPORTED_MODULE_25__["trigger"])(input, 'change');
      });
      plusBtn.addEventListener('click', function () {
        if (!input.getAttribute('initialized')) {
          initialize(input, min);
        } else if (max) {
          if (Number(input.value) < Number(max)) {
            input.stepUp();
          }
        } else {
          input.stepUp();
        }

        Object(_utilities__WEBPACK_IMPORTED_MODULE_25__["trigger"])(input, 'change');
      });
      return inputGroup;
    }
  }, {
    key: "getFormInputField",
    value: function getFormInputField(type) {
      var el = _get(_getPrototypeOf(bootstrap4Theme.prototype), "getFormInputField", this).call(this, type);

      if (type !== 'checkbox' && type !== 'radio' && type !== 'file') {
        el.classList.add('form-control');
        if (this.options.input_size === 'small') el.classList.add('form-control-sm');
        if (this.options.input_size === 'large') el.classList.add('form-control-lg');
      }

      if (type === 'file') {
        /* custom_form is not used on files, would be a bit ticky since we need more */

        /* markup. Also it contains language strings which would need be translateable? */

        /* and most of all, w/o JavaScript teh name of the file can't be displayed. */
        el.classList.add('form-control-file');
      }

      return el;
    }
  }, {
    key: "getFormControl",
    value: function getFormControl(label, input, description, infoText) {
      var group = document.createElement('div');
      group.classList.add('form-group');

      if (label && (input.type === 'checkbox' || input.type === 'radio')) {
        var check = document.createElement('div');

        if (this.options.custom_forms === false) {
          check.classList.add('form-check');
          input.classList.add('form-check-input');
          label.classList.add('form-check-label');
        } else {
          check.classList.add('custom-control');
          input.classList.add('custom-control-input');
          label.classList.add('custom-control-label');

          if (input.type === 'checkbox') {
            check.classList.add('custom-checkbox');
          } else {
            check.classList.add('custom-radio');
          }
        }

        var unique = (Date.now() * Math.random()).toFixed(0);
        input.setAttribute('id', unique);
        label.setAttribute('for', unique);
        check.appendChild(input);
        check.appendChild(label);
        if (infoText) check.appendChild(infoText);
        group.appendChild(check);
      } else {
        if (label) {
          group.appendChild(label);
          if (infoText) group.appendChild(infoText);
        }

        group.appendChild(input);
      }

      if (description) {
        group.appendChild(description);
      }

      return group;
    }
  }, {
    key: "getInfoButton",
    value: function getInfoButton(text) {
      var button = document.createElement('button');
      /* shoud be a <button> but no fitting tbws style... */

      button.type = 'button';
      button.classList.add('ml-3', 'jsoneditor-twbs4-text-button');
      button.setAttribute('data-toggle', 'tooltip');
      button.setAttribute('data-placement', 'auto');
      button.title = text;
      var icon = document.createTextNode('ⓘ');
      button.appendChild(icon);

      if (this.options.tooltip === 'bootstrap') {
        if (window.jQuery && window.jQuery().tooltip) {
          window.jQuery(button).tooltip();
        } else {
          // eslint-disable-next-line no-console
          console.warn('Could not find popper jQuery plugin of Bootstrap.');
        }
      } else if (this.options.tooltip === 'css') {
        button.classList.add('je-tooltip');
      }
      /* else -> nothing todo for native [title] handling */


      return button;
    }
    /**
     * Generates a checkbox...
     *
     * Overwriten from master theme to get rid of inline styles.
     */

  }, {
    key: "getCheckbox",
    value: function getCheckbox() {
      var el = this.getFormInputField('checkbox');
      return el;
    }
    /**
     * Multiple checkboxes in a row.
     *
     */

  }, {
    key: "getMultiCheckboxHolder",
    value: function getMultiCheckboxHolder(controls, label, description, infoText) {
      var el = document.createElement('div');
      el.classList.add('form-group');

      if (label) {
        el.appendChild(label);

        if (infoText) {
          label.appendChild(infoText);
        }
      }
      /* for inline view we need an container so it doesnt wrap in the "row" of the <label> */


      var container = document.createElement('div');
      Object.values(controls).forEach(function (c) {
        /* controls are already parsed by getFormControl() so they have an .form-group */

        /* wrapper we need to get rid of... */
        var ctrl = c.firstChild;
        /* we don't know if this should be an normal / compact view */

        /* if (this.options.custom_forms === false) {
          ctrl.classList.add('form-check-inline')
        } else {
          ctrl.classList.add('custom-control-inline')
        } */

        container.appendChild(ctrl);
      });
      el.appendChild(container);
      if (description) el.appendChild(description);
      return el;
    }
    /**
     * Single radio element
     */

  }, {
    key: "getFormRadio",
    value: function getFormRadio(attributes) {
      var el = this.getFormInputField('radio');

      for (var key in attributes) {
        el.setAttribute(key, attributes[key]);
      }

      if (this.options.custom_forms === false) {
        el.classList.add('form-check-input');
      } else {
        el.classList.add('custom-control-input');
      }

      return el;
    }
    /**
     * Add the <label> for the single radio from getFormRadio()
     *
     */

  }, {
    key: "getFormRadioLabel",
    value: function getFormRadioLabel(text, req) {
      var el = document.createElement('label');

      if (this.options.custom_forms === false) {
        el.classList.add('form-check-label');
      } else {
        el.classList.add('custom-control-label');
      }

      el.appendChild(document.createTextNode(text));
      return el;
    }
    /**
     * Stack the radios from getFormRadio()/getFormRadioLabel()
     *
     */

  }, {
    key: "getFormRadioControl",
    value: function getFormRadioControl(label, input, compact) {
      var el = document.createElement('div');

      if (this.options.custom_forms === false) {
        el.classList.add('form-check');
      } else {
        el.classList.add('custom-control', 'custom-radio');
      }

      el.appendChild(input);
      el.appendChild(label);

      if (compact) {
        if (this.options.custom_forms === false) {
          el.classList.add('form-check-inline');
        } else {
          el.classList.add('custom-control-inline');
        }
      }

      return el;
    }
  }, {
    key: "getIndentedPanel",
    value: function getIndentedPanel() {
      var el = document.createElement('div');
      el.classList.add('card', 'card-body', 'mb-3');

      if (this.options.object_background) {
        el.classList.add(this.options.object_background);
      }

      if (this.options.object_text) {
        el.classList.add(this.options.object_text);
      }
      /* for better twbs card styling we should be able to return a nested div */


      return el;
    }
  }, {
    key: "getFormInputDescription",
    value: function getFormInputDescription(text) {
      var el = document.createElement('small');
      el.classList.add('form-text', 'description'); // Mahara

      if (window.DOMPurify) {
        el.innerHTML = window.DOMPurify.sanitize(text);
      } else {
        el.textContent = this.cleanText(text);
      }

      return el;
    }
  }, {
    key: "getHeader",
    value: function getHeader(text, pathDepth) {
      /* var cardHeader = document.createElement('div') */

      /* cardHeader.classList.add('card-header') */
      var el = document.createElement('h3');
      el.classList.add('card-title');
      el.classList.add('level-' + pathDepth);

      if (typeof text === 'string') {
        el.textContent = text;
      } else {
        el.appendChild(text);
      }

      el.setAttribute('style', 'margin-right: 10px;'); // Mahara
      el.style.display = 'inline-block';
      /* cardHeader.appendChild(el) */

      return el;
    }
  }, {
    key: "getHeaderButtonHolder",
    value: function getHeaderButtonHolder() {
      var el = this.getButtonHolder();
      return el;
    }
  }, {
    key: "getButtonHolder",
    value: function getButtonHolder() {
      var el = document.createElement('span');
      el.classList.add('btn-group');
      return el;
    }
  }, {
    key: "getFormButtonHolder",
    value: function getFormButtonHolder(buttonAlign) {
      var el = this.getButtonHolder();
      el.classList.add('d-block');
      if (buttonAlign === 'center') el.classList.add('text-center');else if (buttonAlign === 'right') el.classList.add('text-right');
      return el;
    }
  }, {
    key: "getButton",
    value: function getButton(text, icon, title) {
      var el = _get(_getPrototypeOf(bootstrap4Theme.prototype), "getButton", this).call(this, text, icon, title);

      el.classList.add('btn', 'btn-secondary', 'btn-sm');
      return el;
    }
  }, {
    key: "getTable",
    value: function getTable() {
      var el = document.createElement('table');
      el.classList.add('table', 'table-sm');

      if (this.options.table_border) {
        el.classList.add('table-bordered');
      }

      if (this.options.table_zebrastyle) {
        el.classList.add('table-striped');
      }

      return el;
    }
  }, {
    key: "getErrorMessage",
    value: function getErrorMessage(text) {
      var el = document.createElement('div');
      el.classList.add('alert', 'alert-danger');
      el.setAttribute('role', 'alert');
      el.appendChild(document.createTextNode(text));
      return el;
    }
    /**
     * input validation on <input>
     */

  }, {
    key: "addInputError",
    value: function addInputError(input, text) {
      if (!input.controlgroup) return;
      input.controlgroup.classList.add('is-invalid');

      if (!input.errmsg) {
        input.errmsg = document.createElement('p');
        input.errmsg.classList.add('invalid-feedback');
        input.controlgroup.appendChild(input.errmsg);
        input.errmsg.style.display = 'block';
      }

      input.errmsg.style.display = 'block';
      input.errmsg.textContent = text;
    }
  }, {
    key: "removeInputError",
    value: function removeInputError(input) {
      if (!input.errmsg) return;
      input.errmsg.style.display = 'none';
      input.controlgroup.classList.remove('is-invalid');
    }
  }, {
    key: "getTabHolder",
    value: function getTabHolder(propertyName) {
      var el = document.createElement('div');
      var pName = typeof propertyName === 'undefined' ? '' : propertyName;
      el.innerHTML = "<div class='col-md-2' id='".concat(pName, "'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(pName, "'></div></div>");
      el.classList.add('row');
      return el;
    }
  }, {
    key: "addTab",
    value: function addTab(holder, tab) {
      holder.children[0].children[0].appendChild(tab);
    }
  }, {
    key: "getTabContentHolder",
    value: function getTabContentHolder(tabHolder) {
      return tabHolder.children[1].children[0];
    }
  }, {
    key: "getTopTabHolder",
    value: function getTopTabHolder(propertyName) {
      var pName = typeof propertyName === 'undefined' ? '' : propertyName;
      var el = document.createElement('div');
      el.classList.add('card');
      el.innerHTML = "<div class='card-header with-tabs'><ul class='nav nav-tabs card-header-tabs' id='".concat(pName, "'></ul></div><div class='card-body'><div class='tab-content' id='").concat(pName, "'></div></div>");
      return el;
    }
  }, {
    key: "getTab",
    value: function getTab(text, tabId) {
      var liel = document.createElement('li');
      liel.classList.add('nav-item');
      var ael = document.createElement('a');
      ael.classList.add('nav-link');
      ael.setAttribute('href', "#".concat(tabId));
      ael.setAttribute('data-toggle', 'tab');
      ael.appendChild(text);
      liel.appendChild(ael);
      return liel;
    }
  }, {
    key: "getTopTab",
    value: function getTopTab(text, tabId) {
      var el = document.createElement('li');
      el.classList.add('nav-item');
      var a = document.createElement('a');
      a.classList.add('nav-link');
      a.setAttribute('href', "#".concat(tabId));
      a.setAttribute('data-toggle', 'tab');
      a.appendChild(text);
      el.appendChild(a);
      return el;
    }
  }, {
    key: "getTabContent",
    value: function getTabContent() {
      var el = document.createElement('div');
      el.classList.add('tab-pane');
      el.setAttribute('role', 'tabpanel');
      return el;
    }
  }, {
    key: "getTopTabContent",
    value: function getTopTabContent() {
      var el = document.createElement('div');
      el.classList.add('tab-pane');
      el.setAttribute('role', 'tabpanel');
      return el;
    }
  }, {
    key: "markTabActive",
    value: function markTabActive(row) {
      row.tab.firstChild.classList.add('active');

      if (typeof row.rowPane !== 'undefined') {
        row.rowPane.classList.add('active');
      } else {
        row.container.classList.add('active');
      }
    }
  }, {
    key: "markTabInactive",
    value: function markTabInactive(row) {
      row.tab.firstChild.classList.remove('active');

      if (typeof row.rowPane !== 'undefined') {
        row.rowPane.classList.remove('active');
      } else {
        row.container.classList.remove('active');
      }
    }
  }, {
    key: "insertBasicTopTab",
    value: function insertBasicTopTab(tab, newTabsHolder) {
      newTabsHolder.children[0].children[0].insertBefore(tab, newTabsHolder.children[0].children[0].firstChild);
    }
  }, {
    key: "addTopTab",
    value: function addTopTab(holder, tab) {
      holder.children[0].children[0].appendChild(tab);
    }
  }, {
    key: "getTopTabContentHolder",
    value: function getTopTabContentHolder(tabHolder) {
      return tabHolder.children[1].children[0];
    }
  }, {
    key: "getFirstTab",
    value: function getFirstTab(holder) {
      return holder.firstChild.firstChild.firstChild;
    }
  }, {
    key: "getProgressBar",
    value: function getProgressBar() {
      var min = 0;
      var max = 100;
      var start = 0;
      var container = document.createElement('div');
      container.classList.add('progress');
      var bar = document.createElement('div');
      bar.classList.add('progress-bar');
      bar.setAttribute('role', 'progressbar');
      bar.setAttribute('aria-valuenow', start);
      bar.setAttribute('aria-valuemin', min);
      bar.setAttribute('aria-valuenax', max);
      bar.innerHTML = "".concat(start, "%");
      container.appendChild(bar);
      return container;
    }
  }, {
    key: "updateProgressBar",
    value: function updateProgressBar(progressBar, progress) {
      if (!progressBar) return;
      var bar = progressBar.firstChild;
      var percentage = "".concat(progress, "%");
      bar.setAttribute('aria-valuenow', progress);
      bar.style.width = percentage;
      bar.innerHTML = percentage;
    }
  }, {
    key: "updateProgressBarUnknown",
    value: function updateProgressBarUnknown(progressBar) {
      if (!progressBar) return;
      var bar = progressBar.firstChild;
      progressBar.classList.add('progress', 'progress-striped', 'active');
      bar.removeAttribute('aria-valuenow');
      bar.style.width = '100%';
      bar.innerHTML = '';
    }
  }, {
    key: "getBlockLink",
    value: function getBlockLink() {
      var link = document.createElement('a');
      link.classList.add('mb-3', 'd-inline-block');
      return link;
    }
    /**
     * Link after successfull upload
     */

  }, {
    key: "getLinksHolder",
    value: function getLinksHolder() {
      var el = document.createElement('div');
      return el;
    }
  }, {
    key: "getInputGroup",
    value: function getInputGroup(input, buttons) {
      if (!input) return;
      var inputGroupContainer = document.createElement('div');
      inputGroupContainer.classList.add('input-group');
      inputGroupContainer.appendChild(input);
      var inputGroup = document.createElement('div');
      inputGroup.classList.add('input-group-append');
      inputGroupContainer.appendChild(inputGroup);

      for (var i = 0; i < buttons.length; i++) {
        /* this uses the getButton() wrapper, so we have to remove the panel/ctrl spacing for this case */
        buttons[i].classList.remove('mr-2', 'btn-secondary');
        buttons[i].classList.add('btn-outline-secondary');
        inputGroup.appendChild(buttons[i]);
      }

      return inputGroupContainer;
    }
  }]);

  return bootstrap4Theme;
}(_theme_js__WEBPACK_IMPORTED_MODULE_23__["AbstractTheme"]);
/* Custom stylesheet rules. format: "selector" : "CSS rules" */

bootstrap4Theme.rules = _bootstrap4_css_js__WEBPACK_IMPORTED_MODULE_24__["default"];

/***/ }),

/***/ "./src/themes/html.css.js":
/*!********************************!*\
  !*** ./src/themes/html.css.js ***!
  \********************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* eslint-disable */
/* harmony default export */ __webpack_exports__["default"] = ({
  ".je-form-input-label": "display:block;margin-bottom:3px;font-weight:bold",
  ".je-form-input-description": "display:inline-block;margin:0;font-size:0.8em;font-style:italic",
  ".je-indented-panel": "padding:5px;margin:10px;border-radius:3px;border:1px%20solid%20%23ddd",
  ".je-child-editor-holder": "margin-bottom:8px",
  ".je-header-button-holder": "display:inline-block;margin-left:10px;font-size:0.8em;vertical-align:middle",
  ".je-table": "margin-bottom:5px;border-bottom:1px%20solid%20%23ccc",
  ".je-upload-preview img": "float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",
  ".je-dropzone": "position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",
  ".je-dropzone:before": "position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",
  ".je-dropzone.valid-dropzone": "background:green",
  ".je-dropzone.invalid-dropzone": "background:red"
});
/* eslint-enable */

/***/ }),

/***/ "./src/themes/html.js":
/*!****************************!*\
  !*** ./src/themes/html.js ***!
  \****************************/
/*! exports provided: htmlTheme */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "htmlTheme", function() { return htmlTheme; });
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var _theme_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../theme.js */ "./src/theme.js");
/* harmony import */ var _html_css_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./html.css.js */ "./src/themes/html.css.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var htmlTheme = /*#__PURE__*/function (_AbstractTheme) {
  _inherits(htmlTheme, _AbstractTheme);

  var _super = _createSuper(htmlTheme);

  function htmlTheme() {
    _classCallCheck(this, htmlTheme);

    return _super.apply(this, arguments);
  }

  _createClass(htmlTheme, [{
    key: "getFormInputLabel",
    value: function getFormInputLabel(text, req) {
      var el = _get(_getPrototypeOf(htmlTheme.prototype), "getFormInputLabel", this).call(this, text, req);

      el.classList.add('je-form-input-label');
      return el;
    }
  }, {
    key: "getFormInputDescription",
    value: function getFormInputDescription(text) {
      var el = _get(_getPrototypeOf(htmlTheme.prototype), "getFormInputDescription", this).call(this, text);

      el.classList.add('je-form-input-label');
      return el;
    }
  }, {
    key: "getIndentedPanel",
    value: function getIndentedPanel() {
      var el = _get(_getPrototypeOf(htmlTheme.prototype), "getIndentedPanel", this).call(this);

      el.classList.add('je-indented-panel');
      return el;
    }
  }, {
    key: "getTopIndentedPanel",
    value: function getTopIndentedPanel() {
      return this.getIndentedPanel();
    }
  }, {
    key: "getChildEditorHolder",
    value: function getChildEditorHolder() {
      var el = _get(_getPrototypeOf(htmlTheme.prototype), "getChildEditorHolder", this).call(this);

      el.classList.add('je-child-editor-holder');
      return el;
    }
  }, {
    key: "getHeaderButtonHolder",
    value: function getHeaderButtonHolder() {
      var el = this.getButtonHolder();
      el.classList.add('je-header-button-holder');
      return el;
    }
  }, {
    key: "getTable",
    value: function getTable() {
      var el = _get(_getPrototypeOf(htmlTheme.prototype), "getTable", this).call(this);

      el.classList.add('je-table');
      return el;
    }
  }, {
    key: "addInputError",
    value: function addInputError(input, text) {
      var group = this.closest(input, '.form-control') || input.controlgroup;

      if (!input.errmsg) {
        input.errmsg = document.createElement('div');
        input.errmsg.setAttribute('class', 'errmsg');
        input.errmsg.style = input.errmsg.style || {};
        input.errmsg.style.color = 'red';
        group.appendChild(input.errmsg);
      } else {
        input.errmsg.style.display = 'block';
      }

      input.errmsg.innerHTML = '';
      input.errmsg.appendChild(document.createTextNode(text));
    }
  }, {
    key: "removeInputError",
    value: function removeInputError(input) {
      if (input.style) {
        input.style.borderColor = '';
      }

      if (input.errmsg) input.errmsg.style.display = 'none';
    }
  }]);

  return htmlTheme;
}(_theme_js__WEBPACK_IMPORTED_MODULE_14__["AbstractTheme"]);
/* Custom stylesheet rules. format: "selector" : "CSS rules" */

htmlTheme.rules = _html_css_js__WEBPACK_IMPORTED_MODULE_15__["default"];

/***/ }),

/***/ "./src/themes/index.js":
/*!*****************************!*\
  !*** ./src/themes/index.js ***!
  \*****************************/
/*! exports provided: themes */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "themes", function() { return themes; });
/* harmony import */ var _html_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./html.js */ "./src/themes/html.js");
/* harmony import */ var _bootstrap3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bootstrap3.js */ "./src/themes/bootstrap3.js");
/* harmony import */ var _bootstrap4_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bootstrap4.js */ "./src/themes/bootstrap4.js");
/* harmony import */ var _jqueryui_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./jqueryui.js */ "./src/themes/jqueryui.js");
/* harmony import */ var _barebones_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./barebones.js */ "./src/themes/barebones.js");
/* harmony import */ var _spectre_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./spectre.js */ "./src/themes/spectre.js");
/* harmony import */ var _tailwind_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./tailwind.js */ "./src/themes/tailwind.js");
 // import  { bootstrap2Theme } from  './bootstrap2'


 // import  { foundationTheme, foundation3Theme, foundation4Theme, foundation5Theme, foundation6Theme } from  './foundation.js'


 // import  { materializeTheme } from  './materialize'



var themes = {
  html: _html_js__WEBPACK_IMPORTED_MODULE_0__["htmlTheme"],
  // bootstrap2: bootstrap2Theme,
  bootstrap3: _bootstrap3_js__WEBPACK_IMPORTED_MODULE_1__["bootstrap3Theme"],
  bootstrap4: _bootstrap4_js__WEBPACK_IMPORTED_MODULE_2__["bootstrap4Theme"],
  // foundation: foundationTheme,
  // foundation3: foundation3Theme,
  // foundation4: foundation4Theme,
  // foundation5: foundation5Theme,
  // foundation6: foundation6Theme,
  jqueryui: _jqueryui_js__WEBPACK_IMPORTED_MODULE_3__["jqueryuiTheme"],
  barebones: _barebones_js__WEBPACK_IMPORTED_MODULE_4__["barebonesTheme"],
  // materialize: materializeTheme,
  spectre: _spectre_js__WEBPACK_IMPORTED_MODULE_5__["spectreTheme"],
  tailwind: _tailwind_js__WEBPACK_IMPORTED_MODULE_6__["tailwindTheme"]
};

/***/ }),

/***/ "./src/themes/jqueryui.js":
/*!********************************!*\
  !*** ./src/themes/jqueryui.js ***!
  \********************************/
/*! exports provided: jqueryuiTheme */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jqueryuiTheme", function() { return jqueryuiTheme; });
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var _theme_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../theme.js */ "./src/theme.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }


var jqueryuiTheme = /*#__PURE__*/function (_AbstractTheme) {
  _inherits(jqueryuiTheme, _AbstractTheme);

  var _super = _createSuper(jqueryuiTheme);

  function jqueryuiTheme() {
    _classCallCheck(this, jqueryuiTheme);

    return _super.apply(this, arguments);
  }

  _createClass(jqueryuiTheme, [{
    key: "getTable",
    value: function getTable() {
      var el = _get(_getPrototypeOf(jqueryuiTheme.prototype), "getTable", this).call(this);

      el.setAttribute('cellpadding', 5);
      el.setAttribute('cellspacing', 0);
      return el;
    }
  }, {
    key: "getTableHeaderCell",
    value: function getTableHeaderCell(text) {
      var el = _get(_getPrototypeOf(jqueryuiTheme.prototype), "getTableHeaderCell", this).call(this, text);

      el.classList.add('ui-state-active');
      el.style.fontWeight = 'bold';
      return el;
    }
  }, {
    key: "getTableCell",
    value: function getTableCell() {
      var el = _get(_getPrototypeOf(jqueryuiTheme.prototype), "getTableCell", this).call(this);

      el.classList.add('ui-widget-content');
      return el;
    }
  }, {
    key: "getHeaderButtonHolder",
    value: function getHeaderButtonHolder() {
      var el = this.getButtonHolder();
      el.style.marginLeft = '10px';
      el.style.fontSize = '.6em';
      el.style.display = 'inline-block';
      return el;
    }
  }, {
    key: "getFormInputDescription",
    value: function getFormInputDescription(text) {
      var el = this.getDescription(text);
      el.style.marginLeft = '10px';
      el.style.display = 'inline-block';
      return el;
    }
  }, {
    key: "getFormControl",
    value: function getFormControl(label, input, description, infoText) {
      var el = _get(_getPrototypeOf(jqueryuiTheme.prototype), "getFormControl", this).call(this, label, input, description, infoText);

      if (input.type === 'checkbox') {
        el.style.lineHeight = '25px';
        el.style.padding = '3px 0';
      } else {
        el.style.padding = '4px 0 8px 0';
      }

      return el;
    }
  }, {
    key: "getDescription",
    value: function getDescription(text) {
      var el = document.createElement('span');
      el.style.fontSize = '.8em';
      el.style.fontStyle = 'italic';
      if (window.DOMPurify) el.innerHTML = window.DOMPurify.sanitize(text);else el.textContent = this.cleanText(text);
      return el;
    }
  }, {
    key: "getButtonHolder",
    value: function getButtonHolder() {
      var el = document.createElement('div');
      el.classList.add('ui-buttonset');
      el.style.fontSize = '.7em';
      return el;
    }
  }, {
    key: "getFormInputLabel",
    value: function getFormInputLabel(text, req) {
      var el = document.createElement('label');
      el.style.fontWeight = 'bold';
      el.style.display = 'block';
      el.textContent = text;
      if (req) el.classList.add('required');
      return el;
    }
  }, {
    key: "getButton",
    value: function getButton(text, icon, title) {
      var button = document.createElement('button');
      button.classList.add('ui-button', 'ui-widget', 'ui-state-default', 'ui-corner-all');
      /* Icon only */

      if (icon && !text) {
        button.classList.add('ui-button-icon-only');
        icon.classList.add('ui-button-icon-primary', 'ui-icon-primary');
        button.appendChild(icon);
        /* Icon and Text */
      } else if (icon) {
        button.classList.add('ui-button-text-icon-primary');
        icon.classList.add('ui-button-icon-primary', 'ui-icon-primary');
        button.appendChild(icon);
        /* Text only */
      } else {
        button.classList.add('ui-button-text-only');
      }

      var el = document.createElement('span');
      el.classList.add('ui-button-text');
      el.textContent = text || title || '.';
      button.appendChild(el);
      button.setAttribute('title', title);
      return button;
    }
  }, {
    key: "setButtonText",
    value: function setButtonText(button, text, icon, title) {
      button.innerHTML = '';
      button.classList.add('ui-button', 'ui-widget', 'ui-state-default', 'ui-corner-all');
      /* Icon only */

      if (icon && !text) {
        button.classList.add('ui-button-icon-only');
        icon.classList.add('ui-button-icon-primary', 'ui-icon-primary');
        button.appendChild(icon);
        /* Icon and Text */
      } else if (icon) {
        button.classList.add('ui-button-text-icon-primary');
        icon.classList.add('ui-button-icon-primary', 'ui-icon-primary');
        button.appendChild(icon);
        /* Text only */
      } else {
        button.classList.add('ui-button-text-only');
      }

      var el = document.createElement('span');
      el.classList.add('ui-button-text');
      el.textContent = text || title || '.';
      button.appendChild(el);
      button.setAttribute('title', title);
    }
  }, {
    key: "getIndentedPanel",
    value: function getIndentedPanel() {
      var el = document.createElement('div');
      el.classList.add('ui-widget-content', 'ui-corner-all');
      el.style.padding = '1em 1.4em';
      el.style.marginBottom = '20px';
      return el;
    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady(input) {
      if (input.controls) return;
      input.controls = this.closest(input, '.form-control');

      if (this.queuedInputErrorText) {
        var text = this.queuedInputErrorText;
        delete this.queuedInputErrorText;
        this.addInputError(input, text);
      }
    }
  }, {
    key: "addInputError",
    value: function addInputError(input, text) {
      if (!input.controls) {
        this.queuedInputErrorText = text;
        return;
      }

      if (!input.errmsg) {
        input.errmsg = document.createElement('div');
        input.errmsg.classList.add('ui-state-error');
        input.controls.appendChild(input.errmsg);
      } else {
        input.errmsg.style.display = '';
      }

      input.errmsg.textContent = text;
    }
  }, {
    key: "removeInputError",
    value: function removeInputError(input) {
      if (!input.controls) {
        delete this.queuedInputErrorText;
      }

      if (!input.errmsg) return;
      input.errmsg.style.display = 'none';
    }
  }, {
    key: "markTabActive",
    value: function markTabActive(row) {
      row.tab.classList.remove('ui-widget-header');
      row.tab.classList.add('ui-state-active');

      if (typeof row.rowPane !== 'undefined') {
        row.rowPane.style.display = '';
      } else {
        row.container.style.display = '';
      }
    }
  }, {
    key: "markTabInactive",
    value: function markTabInactive(row) {
      row.tab.classList.add('ui-widget-header');
      row.tab.classList.remove('ui-state-active');

      if (typeof row.rowPane !== 'undefined') {
        row.rowPane.style.display = 'none';
      } else {
        row.container.style.display = 'none';
      }
    }
  }]);

  return jqueryuiTheme;
}(_theme_js__WEBPACK_IMPORTED_MODULE_14__["AbstractTheme"]);
/* Custom stylesheet rules. format: "selector" : "CSS rules" */

jqueryuiTheme.rules = {
  'div[data-schemaid="root"]:after': 'position:relative;color:red;margin:10px 0;font-weight:600;display:block;width:100%;text-align:center;content:"This is an old JSON-Editor 1.x Theme and might not display elements correctly when used with the 2.x version"'
};

/***/ }),

/***/ "./src/themes/spectre.css.js":
/*!***********************************!*\
  !*** ./src/themes/spectre.css.js ***!
  \***********************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* eslint-disable */
/* harmony default export */ __webpack_exports__["default"] = ({
  "*": "--primary-color:%235755d9;--gray-color:%23bcc3ce;--light-color:%23fff",
  ".slider:focus": "box-shadow:none",
  "h4 > label + .btn-group": "margin-left:1rem",
  ".text-right > button": "margin-right:0%20!important",
  ".text-left > button": "margin-left:0%20!important",
  ".property-selector": "font-size:0.7rem;font-weight:normal;max-height:260px%20!important;width:395px%20!important",
  ".property-selector .form-checkbox": "margin:0",
  "textarea": "width:100%25;min-height:2rem;resize:vertical",
  "table": "border-collapse:collapse",
  ".table td": "padding:0.4rem%200.4rem",
  ".mr-5": "margin-right:1rem%20!important",
  "div[data-schematype]:not([data-schematype='object'])": "transition:0.5s",
  "div[data-schematype]:not([data-schematype='object']):hover": "background-color:%23eee",
  ".je-table-border td": "border:0.05rem%20solid%20%23dadee4%20!important",
  ".btn-info": "font-size:0.5rem;font-weight:bold;height:0.8rem;padding:0.15rem%200;line-height:0.8;margin:0.3rem%200%200.3rem%200.1rem",
  ".je-label + select": "min-width:5rem",
  ".je-label": "font-weight:600",
  ".btn-action.btn-info": "width:0.8rem",
  ".je-border": "border:0.05rem%20solid%20%23dadee4",
  ".je-panel": "padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",
  ".je-panel-top": "padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",
  ".required:after": "content:%22%20*%22;color:red;font:inherit",
  ".je-align-bottom": "margin-top:auto",
  ".je-desc": "font-size:smaller;margin:0.2rem%200",
  ".je-upload-preview img": "float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem;border:3px%20solid%20white;box-shadow:0px%200px%208px%20rgba(0%2C%200%2C%200%2C%200.3);box-sizing:border-box",
  ".je-dropzone": "position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",
  ".je-dropzone:before": "position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",
  ".je-dropzone.valid-dropzone": "background:green",
  ".je-dropzone.invalid-dropzone": "background:red",
  ".columns .container.je-noindent": "padding-left:0;padding-right:0",
  ".selectize-control.multi .item": "background:var(--primary-color)%20!important",
  ".select2-container--default   .select2-selection--single   .select2-selection__arrow": "display:none",
  ".select2-container--default .select2-selection--single": "border:none",
  ".select2-container .select2-selection--single .select2-selection__rendered": "padding:0",
  ".select2-container .select2-search--inline .select2-search__field": "margin-top:0",
  ".select2-container--default.select2-container--focus   .select2-selection--multiple": "border:0.05rem%20solid%20var(--gray-color)",
  ".select2-container--default   .select2-selection--multiple   .select2-selection__choice": "margin:0.4rem%200.2rem%200.2rem%200;padding:2px%205px;background-color:var(--primary-color);color:var(--light-color)",
  ".select2-container--default .select2-search--inline .select2-search__field": "line-height:normal",
  ".choices": "margin-bottom:auto",
  ".choices__list--multiple .choices__item": "border:none;background-color:var(--primary-color);color:var(--light-color)",
  ".choices[data-type*='select-multiple'] .choices__button": "border-left:0.05rem%20solid%20%232826a6",
  ".choices__inner": "font-size:inherit;min-height:20px;padding:4px%207.5px%204px%203.75px",
  ".choices[data-type*='select-one'] .choices__inner": "padding-bottom:4px",
  ".choices__list--dropdown .choices__item": "font-size:inherit"
});
/* eslint-enable */

/***/ }),

/***/ "./src/themes/spectre.js":
/*!*******************************!*\
  !*** ./src/themes/spectre.js ***!
  \*******************************/
/*! exports provided: spectreTheme */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "spectreTheme", function() { return spectreTheme; });
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js");
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var _theme_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../theme.js */ "./src/theme.js");
/* harmony import */ var _spectre_css_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./spectre.css.js */ "./src/themes/spectre.css.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }




















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

/* Spectre Theme using Spectre CSS framework. <https://picturepan2.github.io/spectre/index.html> */


/* Config options that allows changing various aspects of the output */

var options = {
  disable_theme_rules: false,

  /* Disable creation of Inline Style Rules */
  label_bold: true,

  /* Element labels bold */
  align_bottom: false,

  /* Align elements to bottom of flex container */
  object_indent: false,

  /* Indent nested object elements */
  object_border: false,

  /* Add border around object elements */
  table_border: false,

  /* Add border to array "table" row and cells */
  table_zebrastyle: false,

  /* Add "zebra style" to array "table" rows */
  input_size: 'normal'
  /* Size of input and select elements. "small", "normal", "large" */

};
var spectreTheme = /*#__PURE__*/function (_AbstractTheme) {
  _inherits(spectreTheme, _AbstractTheme);

  var _super = _createSuper(spectreTheme);

  function spectreTheme(jsoneditor) {
    _classCallCheck(this, spectreTheme);

    return _super.call(this, jsoneditor, options);
  }
  /* Functions for setting up the grid container, row and columns */


  _createClass(spectreTheme, [{
    key: "setGridColumnSize",
    value: function setGridColumnSize(el, size, offset) {
      el.classList.add("col-".concat(size));
      if (offset) el.classList.add('col-mx-auto');
    }
  }, {
    key: "getGridContainer",
    value: function getGridContainer() {
      var el = document.createElement('div');
      el.classList.add('container');
      if (!this.options.object_indent) el.classList.add('je-noindent');
      return el;
    }
  }, {
    key: "getGridRow",
    value: function getGridRow() {
      var el = document.createElement('div');
      el.classList.add('columns');
      return el;
    }
  }, {
    key: "getGridColumn",
    value: function getGridColumn() {
      var el = document.createElement('div');
      el.classList.add('column');
      if (this.options.align_bottom) el.classList.add('je-align-bottom');
      return el;
    }
    /* Used for "type: object" or "type: array" (except if "format: tabs-top") */

  }, {
    key: "getIndentedPanel",
    value: function getIndentedPanel() {
      var el = document.createElement('div');
      el.classList.add('je-panel');
      if (this.options.object_border) el.classList.add('je-border');
      return el;
    }
    /* Used for "type: array" with "format: tabs-top" */

  }, {
    key: "getTopIndentedPanel",
    value: function getTopIndentedPanel() {
      var el = document.createElement('div');
      el.classList.add('je-panel-top');
      if (this.options.object_border) el.classList.add('je-border');
      return el;
    }
    /* Button functions */

  }, {
    key: "getHeaderButtonHolder",
    value: function getHeaderButtonHolder() {
      var el = this.getButtonHolder();
      return el;
    }
    /* Button holder for the buttons */

  }, {
    key: "getButtonHolder",
    value: function getButtonHolder() {
      var el = _get(_getPrototypeOf(spectreTheme.prototype), "getButtonHolder", this).call(this);

      el.classList.add('btn-group');
      return el;
    }
  }, {
    key: "getFormButtonHolder",
    value: function getFormButtonHolder(buttonAlign) {
      var el = _get(_getPrototypeOf(spectreTheme.prototype), "getFormButtonHolder", this).call(this);

      el.classList.remove('btn-group');
      el.classList.add('d-block');
      if (buttonAlign === 'center') el.classList.add('text-center');else if (buttonAlign === 'right') el.classList.add('text-right');else el.classList.add('text-left');
      return el;
    }
  }, {
    key: "getFormButton",
    value: function getFormButton(text, icon, title) {
      var el = _get(_getPrototypeOf(spectreTheme.prototype), "getFormButton", this).call(this, text, icon, title);

      el.classList.add('btn', 'btn-primary', 'mx-2', 'my-1');
      if (this.options.input_size !== 'small') el.classList.remove('btn-sm');
      if (this.options.input_size === 'large') el.classList.add('btn-lg');
      return el;
    }
  }, {
    key: "getButton",
    value: function getButton(text, icon, title) {
      var el = _get(_getPrototypeOf(spectreTheme.prototype), "getButton", this).call(this, text, icon, title);

      el.classList.add('btn', 'btn-sm', 'btn-primary', 'mr-2', 'my-1');
      return el;
    }
  }, {
    key: "getHeader",
    value: function getHeader(text, pathDepth) {
      var el = document.createElement('h4');

      if (typeof text === 'string') {
        el.textContent = text;
      } else {
        el.appendChild(text);
      }

      el.style.display = 'inline-block';
      return el;
    }
  }, {
    key: "getFormInputDescription",
    value: function getFormInputDescription(text) {
      var el = _get(_getPrototypeOf(spectreTheme.prototype), "getFormInputDescription", this).call(this, text);

      el.classList.add('je-desc', 'hide-sm');
      return el;
    }
    /* Label for all elements except checkbox and radio */

  }, {
    key: "getFormInputLabel",
    value: function getFormInputLabel(text, req) {
      var el = _get(_getPrototypeOf(spectreTheme.prototype), "getFormInputLabel", this).call(this, text, req);

      if (this.options.label_bold) el.classList.add('je-label');
      return el;
    }
    /* Checkbox elements */

    /* ToDo: Rename function names for consistency */

  }, {
    key: "getCheckbox",
    value: function getCheckbox() {
      var el = this.getFormInputField('checkbox');
      return el;
    }
  }, {
    key: "getCheckboxLabel",
    value: function getCheckboxLabel(text, req) {
      var el = _get(_getPrototypeOf(spectreTheme.prototype), "getCheckboxLabel", this).call(this, text, req);

      var icon = document.createElement('i');
      icon.classList.add('form-icon');
      el.classList.add('form-checkbox', 'mr-5');
      el.insertBefore(icon, el.firstChild);
      return el;
    }
  }, {
    key: "getFormCheckboxControl",
    value: function getFormCheckboxControl(label, input, compact) {
      label.insertBefore(input, label.firstChild);
      /* Move input into label element */

      if (compact) label.classList.add('form-inline');
      return label;
    }
  }, {
    key: "getMultiCheckboxHolder",
    value: function getMultiCheckboxHolder(controls, label, description, infoText) {
      return _get(_getPrototypeOf(spectreTheme.prototype), "getMultiCheckboxHolder", this).call(this, controls, label, description, infoText);
    }
    /* Radio elements */

  }, {
    key: "getFormRadio",
    value: function getFormRadio(attributes) {
      var el = this.getFormInputField('radio');

      for (var key in attributes) {
        el.setAttribute(key, attributes[key]);
      }

      return el;
    }
  }, {
    key: "getFormRadioLabel",
    value: function getFormRadioLabel(text, req) {
      var el = _get(_getPrototypeOf(spectreTheme.prototype), "getFormRadioLabel", this).call(this, text, req);

      var icon = document.createElement('i');
      icon.classList.add('form-icon');
      el.classList.add('form-radio');
      el.insertBefore(icon, el.firstChild);
      return el;
    }
  }, {
    key: "getFormRadioControl",
    value: function getFormRadioControl(label, input, compact) {
      label.insertBefore(input, label.firstChild);
      /* Move input into label element */

      if (compact) label.classList.add('form-inline');
      return label;
    }
    /* Create input field */

  }, {
    key: "getFormInputField",
    value: function getFormInputField(type) {
      var el = _get(_getPrototypeOf(spectreTheme.prototype), "getFormInputField", this).call(this, type);

      if (!['checkbox', 'radio'].includes(type)) {
        el.classList.add('form-input');
      }

      return el;
    }
    /* Create input field for type="range" */

  }, {
    key: "getRangeInput",
    value: function getRangeInput(min, max, step) {
      var el = this.getFormInputField('range');
      el.classList.add('slider');
      el.classList.remove('form-input');
      el.setAttribute('oninput', 'this.setAttribute("value", this.value)');
      el.setAttribute('min', min);
      el.setAttribute('max', max);
      el.setAttribute('step', step);
      return el;
    }
  }, {
    key: "getRangeControl",
    value: function getRangeControl(input, output) {
      var el = _get(_getPrototypeOf(spectreTheme.prototype), "getRangeControl", this).call(this, input, output);

      el.classList.add('text-center');
      return el;
    }
    /* Create select box field */

  }, {
    key: "getSelectInput",
    value: function getSelectInput(options, multiple) {
      var el = _get(_getPrototypeOf(spectreTheme.prototype), "getSelectInput", this).call(this, options);

      el.classList.add('form-select');
      return el;
    }
    /* Create textarea field */

  }, {
    key: "getTextareaInput",
    value: function getTextareaInput() {
      var el = document.createElement('textarea');
      el.classList.add('form-input');
      return el;
    }
  }, {
    key: "getFormControl",
    value: function getFormControl(label, input, description, infoText) {
      var group = document.createElement('div');
      group.classList.add('form-group');

      if (label && (input.type === 'checkbox' || input.type === 'radio')) {
        group.classList.add(input.type);
        label.insertBefore(input, label.firstChild);
        group.appendChild(label);
      } else {
        if (label) {
          label.classList.add('form-label');
          group.appendChild(label);
          if (infoText) label.appendChild(infoText);
        }

        group.appendChild(input);
      }

      if (this.options.input_size === 'small') input.classList.add('input-sm', 'select-sm');else if (this.options.input_size === 'large') input.classList.add('input-lg', 'select-lg');
      if (input.type !== 'checkbox') group.appendChild(input);
      if (description) group.appendChild(description);
      return group;
    }
    /* Create input group (input field with buttons) */

  }, {
    key: "getInputGroup",
    value: function getInputGroup(input, buttons) {
      if (!input) return;
      var inputGroup = document.createElement('div');
      inputGroup.classList.add('input-group');
      inputGroup.appendChild(input);

      for (var i = 0; i < buttons.length; i++) {
        buttons[i].classList.add('input-group-btn');
        buttons[i].classList.remove('btn-sm', 'mr-2', 'my-1');
        inputGroup.appendChild(buttons[i]);
      }

      return inputGroup;
    }
    /* Create button for displaying infotext tooltip */

  }, {
    key: "getInfoButton",
    value: function getInfoButton(text) {
      var popover = document.createElement('div');
      popover.classList.add('popover', 'popover-left', 'float-right');
      var button = document.createElement('button');
      button.classList.add('btn', 'btn-secondary', 'btn-info', 'btn-action', 's-circle');
      button.setAttribute('tabindex', '-1');
      /* exclude element from tab order */

      popover.appendChild(button);
      var icon = document.createTextNode('I');
      button.appendChild(icon);
      var container = document.createElement('div');
      container.classList.add('popover-container');
      popover.appendChild(container);
      var card = document.createElement('div');
      card.classList.add('card');
      container.appendChild(card);
      var cardbody = document.createElement('div');
      cardbody.classList.add('card-body');
      cardbody.innerHTML = text;
      card.appendChild(cardbody);
      return popover;
    }
    /* Functions for rendering array with format: "table" */

  }, {
    key: "getTable",
    value: function getTable() {
      var el = _get(_getPrototypeOf(spectreTheme.prototype), "getTable", this).call(this);

      el.classList.add('table', 'table-scroll');
      if (this.options.table_border) el.classList.add('je-table-border');
      if (this.options.table_zebrastyle) el.classList.add('table-striped');
      return el;
    }
    /* Function for rendering progressbar */

  }, {
    key: "getProgressBar",
    value: function getProgressBar() {
      var progressBar = _get(_getPrototypeOf(spectreTheme.prototype), "getProgressBar", this).call(this);

      progressBar.classList.add('progress');
      return progressBar;
    }
    /* Containers for array with format: "tab" */

  }, {
    key: "getTabHolder",
    value: function getTabHolder(propertyName) {
      var pName = typeof propertyName === 'undefined' ? '' : propertyName;
      var el = document.createElement('div');
      el.classList.add('columns');
      el.innerHTML = "<div class=\"column col-2\"></div><div class=\"column col-10 content\" id=\"".concat(pName, "\"></div>");
      return el;
    }
    /* Containers for array with format: "tab-top" */

  }, {
    key: "getTopTabHolder",
    value: function getTopTabHolder(propertyName) {
      var pName = typeof propertyName === 'undefined' ? '' : propertyName;
      var el = document.createElement('div');
      el.innerHTML = "<ul class=\"tab\"></ul><div class=\"content\" id=\"".concat(pName, "\"></div>");
      return el;
    }
    /* Tab button for array with format: "tab" */

  }, {
    key: "getTab",
    value: function getTab(span, tabId) {
      var el = document.createElement('a');
      el.classList.add('btn', 'btn-secondary', 'btn-block');
      el.setAttribute('href', "#".concat(tabId));
      el.appendChild(span);
      return el;
    }
    /* Tab button for array with format: "tab-top" */

  }, {
    key: "getTopTab",
    value: function getTopTab(span, tabId) {
      var el = document.createElement('li');
      el.id = tabId;
      el.classList.add('tab-item');
      /* Spectre needs an a tag inside the tab item, not a span */

      var a = document.createElement('a');
      a.setAttribute('href', "#".concat(tabId));
      a.appendChild(span);
      el.appendChild(a);
      return el;
    }
  }, {
    key: "markTabActive",
    value: function markTabActive(row) {
      row.tab.classList.add('active');
      if (typeof row.rowPane !== 'undefined') row.rowPane.style.display = '';else row.container.style.display = '';
    }
  }, {
    key: "markTabInactive",
    value: function markTabInactive(row) {
      row.tab.classList.remove('active');
      if (typeof row.rowPane !== 'undefined') row.rowPane.style.display = 'none';else row.container.style.display = 'none';
    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady(input) {
      if (input.localName === 'select') {
        /* Selectize adjustments */
        if (input.classList.contains('selectized')) {
          var selectized = input.nextSibling;

          if (selectized) {
            /* Remove Spectre class 'form-select' as this conflicts with Selectize styling */
            selectized.classList.remove('form-select');
            Array.from(selectized.querySelectorAll('.form-select')).forEach(function (el) {
              el.classList.remove('form-select');
            });
          }
          /* Select2 ajustments */

        } else if (input.classList.contains('select2-hidden-accessible')) {
          var select2 = input.nextSibling;
          var single = select2 && select2.querySelector('.select2-selection--single');
          /* Add Spectre 'form-select' to single-select2 elements */

          if (single) select2.classList.add('form-select');
        }
      }

      if (input.controlgroup) return;
      input.controlgroup = this.closest(input, '.form-group');

      if (this.closest(input, '.compact')) {
        input.controlgroup.style.marginBottom = 0;
      }
    }
    /* Controls output of errormessages displayed in form */

  }, {
    key: "addInputError",
    value: function addInputError(input, text) {
      if (!input.controlgroup) return;
      input.controlgroup.classList.add('has-error');

      if (!input.errmsg) {
        input.errmsg = document.createElement('p');
        input.errmsg.classList.add('form-input-hint');
        input.controlgroup.appendChild(input.errmsg);
      }

      input.errmsg.classList.remove('d-hide');
      input.errmsg.textContent = text;
    }
  }, {
    key: "removeInputError",
    value: function removeInputError(input) {
      if (!input.errmsg) return;
      input.errmsg.classList.add('d-hide');
      input.controlgroup.classList.remove('has-error');
    }
  }]);

  return spectreTheme;
}(_theme_js__WEBPACK_IMPORTED_MODULE_18__["AbstractTheme"]);
/* Custom stylesheet rules. (Does not support comma separated selectors) */

/*  Will create a stylesheet in document head with the id "theme-spectre" if not exists. */

spectreTheme.rules = _spectre_css_js__WEBPACK_IMPORTED_MODULE_19__["default"];

/***/ }),

/***/ "./src/themes/tailwind.css.js":
/*!************************************!*\
  !*** ./src/themes/tailwind.css.js ***!
  \************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* eslint-disable */
/* harmony default export */ __webpack_exports__["default"] = ({
  ".slider": "-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;display:block;border:none;height:1.2rem;width:100%25",
  ".slider:focus": "box-shadow:0%200%200%200%20rgba(87%2C%2085%2C%20217%2C%200.2);outline:none",
  ".slider.tooltip:not([data-tooltip])::after": "content:attr(value)",
  ".slider::-webkit-slider-thumb": "-webkit-appearance:none;background:%23f17405;border-radius:100%25;height:0.6rem;margin-top:-0.25rem;transition:transform%200.2s;width:0.6rem",
  ".slider:active::-webkit-slider-thumb": "transform:scale(1.25);outline:none",
  ".slider::-webkit-slider-runnable-track": "background:%23b2b4b6;border-radius:0.1rem;height:0.1rem;width:100%25",
  "a.tooltips": "position:relative;display:inline",
  "a.tooltips span": "position:absolute;white-space:nowrap;width:auto;padding-left:1rem;padding-right:1rem;color:%23ffffff;background:rgba(56%2C%2056%2C%2056%2C%200.85);height:1.5rem;line-height:1.5rem;text-align:center;visibility:hidden;border-radius:3px",
  "a.tooltips span:after": "content:%22%22;position:absolute;top:50%25;left:100%25;margin-top:-5px;width:0;height:0;border-left:5px%20solid%20rgba(56%2C%2056%2C%2056%2C%200.85);border-top:5px%20solid%20transparent;border-bottom:5px%20solid%20transparent",
  "a:hover.tooltips span": "visibility:visible;opacity:0.9;font-size:0.8rem;right:100%25;top:50%25;margin-top:-12px;margin-right:10px;z-index:999",
  ".json-editor-btntype-properties + div": "font-size:0.8rem;font-weight:normal",
  "textarea": "width:100%25;min-height:2rem;resize:vertical",
  "table": "width:100%25;border-collapse:collapse",
  ".table td": "padding:0rem%200rem",
  "div[data-schematype]:not([data-schematype='object'])": "transition:0.5s",
  "div[data-schematype]:not([data-schematype='object']):hover": "background-color:%23e6f4fe",
  "div[data-schemaid='root']": "position:relative;width:inherit;display:inherit;overflow-x:hidden;z-index:10",
  "select[multiple]": "height:auto",
  "select[multiple].from-select": "height:auto",
  ".je-table-zebra:nth-child(even)": "background-color:%23f2f2f2",
  ".je-table-border": "border:0.5px%20solid%20black",
  ".je-table-hdiv": "border-bottom:1px%20solid%20black",
  ".je-border": "border:0.05rem%20solid%20%233182ce",
  ".je-panel": "width:inherit;padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",
  ".je-panel-top": "width:100%25;padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",
  ".required:after": "content:%22%20*%22;color:red;font:inherit;font-weight:bold",
  ".je-desc": "font-size:smaller;margin:0.2rem%200",
  ".container-xl.je-noindent": "padding-left:0;padding-right:0",
  ".json-editor-btntype-add": "color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%234299e1;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",
  ".json-editor-btntype-deletelast": "color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%23e53e3e;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",
  ".json-editor-btntype-deleteall": "color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%23000000;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",
  ".json-editor-btn-save": "float:right;color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%232b6cb0;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",
  ".json-editor-btn-back": "color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%232b6cb0;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",
  ".json-editor-btntype-delete": "color:%23e53e3e;background-color:rgba(218%2C%20222%2C%20228%2C%200.1);margin:0.03rem;padding:0.1rem",
  ".json-editor-btntype-move": "color:%23000000;background-color:rgba(218%2C%20222%2C%20228%2C%200.1);margin:0.03rem;padding:0.1rem",
  ".json-editor-btn-collapse": "padding:0em%200.8rem;font-size:1.3rem;color:%23e53e3e;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",
  ".je-upload-preview img": "float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",
  ".je-dropzone": "position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",
  ".je-dropzone:before": "position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",
  ".je-dropzone.valid-dropzone": "background:green",
  ".je-dropzone.invalid-dropzone": "background:red"
});
/* eslint-enable */

/***/ }),

/***/ "./src/themes/tailwind.js":
/*!********************************!*\
  !*** ./src/themes/tailwind.js ***!
  \********************************/
/*! exports provided: tailwindTheme */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tailwindTheme", function() { return tailwindTheme; });
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var _theme_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../theme.js */ "./src/theme.js");
/* harmony import */ var _tailwind_css_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./tailwind.css.js */ "./src/themes/tailwind.css.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }


















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); return Constructor; }

function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }



var options = {
  disable_theme_rules: false,

  /* Disable creation of Inline Style Rules */
  label_bold: false,

  /* Element labels bold */
  object_panel_default: true,

  /* Indicates whether to use rules as default or alternate style */
  object_indent: true,

  /* Indent nested object elements */
  object_border: false,

  /* Add border around object elements */
  table_border: false,

  /* Add border to array "table" row and cells */
  table_hdiv: false,

  /* Add bottom-border to array "table" cells */
  table_zebrastyle: false,

  /* Add "zebra style" to array "table" rows */
  input_size: 'small',

  /* Size of input and select elements. "small", "normal", "large" */
  enable_compact: false
};
var tailwindTheme = /*#__PURE__*/function (_AbstractTheme) {
  _inherits(tailwindTheme, _AbstractTheme);

  var _super = _createSuper(tailwindTheme);

  function tailwindTheme(jsoneditor) {
    _classCallCheck(this, tailwindTheme);

    return _super.call(this, jsoneditor, options);
  }

  _createClass(tailwindTheme, [{
    key: "getGridContainer",
    value: function getGridContainer() {
      var el = document.createElement('div');
      el.classList.add('flex', 'flex-col', 'w-full');
      if (!this.options.object_indent) el.classList.add('je-noindent');
      return el;
    }
  }, {
    key: "getGridRow",
    value: function getGridRow() {
      var el = document.createElement('div');
      el.classList.add('flex', 'flex-wrap', 'w-full');
      return el;
    }
  }, {
    key: "getGridColumn",
    value: function getGridColumn() {
      var el = document.createElement('div');
      el.classList.add('flex', 'flex-col');
      return el;
    }
  }, {
    key: "setGridColumnSize",
    value: function setGridColumnSize(el, size, offset) {
      if (size > 0 && size < 12) {
        el.classList.add("w-".concat(size, "/12"), 'px-1');
      } else el.classList.add('w-full', 'px-1');

      if (offset) el.style.marginLeft = "".concat(100 / 12 * offset, "%");
    }
  }, {
    key: "getIndentedPanel",
    value: function getIndentedPanel() {
      var el = document.createElement('div');

      if (this.options.object_panel_default) {
        el.classList.add('w-full', 'p-1');
      } else {
        el.classList.add('relative', 'flex', 'flex-col', 'rounded', 'break-words', 'border', 'bg-white', 'border-0', 'border-blue-400', 'p-1', 'shadow-md');
      }

      if (this.options.object_border) el.classList.add('je-border');
      return el;
    }
    /* Used for "type: array" with "format: tabs-top" */

  }, {
    key: "getTopIndentedPanel",
    value: function getTopIndentedPanel() {
      var el = document.createElement('div');

      if (this.options.object_panel_default) {
        el.classList.add('w-full', 'm-2');
      } else {
        el.classList.add('relative', 'flex', 'flex-col', 'rounded', 'break-words', 'border', 'bg-white', 'border-0', 'border-blue-400', 'p-1', 'shadow-md');
      }

      if (this.options.object_border) el.classList.add('je-border');
      return el;
    }
  }, {
    key: "getTitle",
    value: function getTitle() {
      return this.translateProperty(this.schema.title);
    }
  }, {
    key: "getSelectInput",
    value: function getSelectInput(options, multiple) {
      var el = _get(_getPrototypeOf(tailwindTheme.prototype), "getSelectInput", this).call(this, options);

      if (multiple) el.classList.add('form-multiselect', 'block', 'py-0', 'h-auto', 'w-full', 'px-1', 'text-sm', 'text-black', 'leading-normal', 'bg-white', 'border', 'border-grey', 'rounded');else el.classList.add('form-select', 'block', 'py-0', 'h-6', 'w-full', 'px-1', 'text-sm', 'text-black', 'leading-normal', 'bg-white', 'border', 'border-grey', 'rounded');
      if (this.options.enable_compact) el.classList.add('compact');
      return el;
    }
  }, {
    key: "afterInputReady",
    value: function afterInputReady(input) {
      if (input.controlgroup) return;
      input.controlgroup = this.closest(input, '.form-group');

      if (this.closest(input, '.compact')) {
        input.controlgroup.style.marginBottom = 0;
      }
    }
  }, {
    key: "getTextareaInput",
    value: function getTextareaInput() {
      var el = _get(_getPrototypeOf(tailwindTheme.prototype), "getTextareaInput", this).call(this);

      el.classList.add('block', 'w-full', 'px-1', 'text-sm', 'leading-normal', 'bg-white', 'text-black', 'border', 'border-grey', 'rounded');
      if (this.options.enable_compact) el.classList.add('compact');
      el.style.height = 0;
      return el;
    }
    /* Create input field for type="range" */

  }, {
    key: "getRangeInput",
    value: function getRangeInput(min, max, step) {
      var el = this.getFormInputField('range');
      el.classList.add('slider');
      if (this.options.enable_compact) el.classList.add('compact');
      el.setAttribute('oninput', 'this.setAttribute("value", this.value)');
      el.setAttribute('min', min);
      el.setAttribute('max', max);
      el.setAttribute('step', step);
      return el;
    }
  }, {
    key: "getRangeControl",
    value: function getRangeControl(input, output) {
      var el = _get(_getPrototypeOf(tailwindTheme.prototype), "getRangeControl", this).call(this, input, output);

      el.classList.add('text-center', 'text-black');
      return el;
    }
    /* Checkbox elements */

  }, {
    key: "getCheckbox",
    value: function getCheckbox() {
      var el = this.getFormInputField('checkbox');
      el.classList.add('form-checkbox', 'text-red-600');
      return el;
    }
  }, {
    key: "getCheckboxLabel",
    value: function getCheckboxLabel(text, req) {
      var el = _get(_getPrototypeOf(tailwindTheme.prototype), "getCheckboxLabel", this).call(this, text, req);

      el.classList.add('inline-flex', 'items-center');
      return el;
    }
  }, {
    key: "getFormCheckboxControl",
    value: function getFormCheckboxControl(label, input, compact) {
      label.insertBefore(input, label.firstChild);
      /* Move input into label element */

      if (compact) label.classList.add('inline-flex flex-row');
      return label;
    }
  }, {
    key: "getMultiCheckboxHolder",
    value: function getMultiCheckboxHolder(controls, label, description, infoText) {
      var el = _get(_getPrototypeOf(tailwindTheme.prototype), "getMultiCheckboxHolder", this).call(this, controls, label, description, infoText);

      el.classList.add('inline-flex', 'flex-col');
      return el;
    }
    /* Radio elements */

  }, {
    key: "getFormRadio",
    value: function getFormRadio(attributes) {
      var el = this.getFormInputField('radio');
      el.classList.add('form-radio', 'text-red-600');

      for (var key in attributes) {
        el.setAttribute(key, attributes[key]);
      }

      return el;
    }
  }, {
    key: "getFormRadioLabel",
    value: function getFormRadioLabel(text, req) {
      var el = _get(_getPrototypeOf(tailwindTheme.prototype), "getFormRadioLabel", this).call(this, text, req);

      el.classList.add('inline-flex', 'items-center', 'mr-2');
      return el;
    }
  }, {
    key: "getFormRadioControl",
    value: function getFormRadioControl(label, input, compact) {
      label.insertBefore(input, label.firstChild);
      /* Move input into label element */

      if (compact) label.classList.add('form-radio');
      return label;
    }
  }, {
    key: "getRadioHolder",
    value: function getRadioHolder(schema, controls, label, description, infoText) {
      var el = _get(_getPrototypeOf(tailwindTheme.prototype), "getRadioHolder", this).call(this, controls, label, description, infoText);

      if (schema.options.layout === 'h') el.classList.add('inline-flex', 'flex-row');else el.classList.add('inline-flex', 'flex-col');
      return el;
    }
  }, {
    key: "getFormInputLabel",
    value: function getFormInputLabel(text, req) {
      var el = _get(_getPrototypeOf(tailwindTheme.prototype), "getFormInputLabel", this).call(this, text, req);

      if (this.options.label_bold) el.classList.add('font-bold');else el.classList.add('required');
      return el;
    }
  }, {
    key: "getFormInputField",
    value: function getFormInputField(type) {
      var el = _get(_getPrototypeOf(tailwindTheme.prototype), "getFormInputField", this).call(this, type);

      if (!['checkbox', 'radio'].includes(type)) el.classList.add('block', 'w-full', 'px-1', 'text-black', 'text-sm', 'leading-normal', 'bg-white', 'border', 'border-grey', 'rounded');
      if (this.options.enable_compact) el.classList.add('compact');
      return el;
    }
  }, {
    key: "getFormInputDescription",
    value: function getFormInputDescription(text) {
      var el = document.createElement('p');
      el.classList.add('block', 'mt-1', 'text-xs');
      if (window.DOMPurify) el.innerHTML = window.DOMPurify.sanitize(text);else el.textContent = this.cleanText(text);
      return el;
    }
  }, {
    key: "getFormControl",
    value: function getFormControl(label, input, description, infoText) {
      var group = document.createElement('div');
      group.classList.add('form-group', 'mb-1', 'w-full');

      if (label) {
        label.classList.add('text-xs');

        if (input.type === 'checkbox') {
          input.classList.add('form-checkbox', 'text-xs', 'text-red-600', 'mr-1');
          label.classList.add('items-center', 'flex');
          label = this.getFormCheckboxControl(label, input, false, infoText);
        }

        if (input.type === 'radio') {
          input.classList.add('form-radio', 'text-red-600', 'mr-1');
          label.classList.add('items-center', 'flex');
          label = this.getFormRadioControl(label, input, false, infoText);
        }

        group.appendChild(label);
        if (!['checkbox', 'radio'].includes(input.type) && infoText) group.appendChild(infoText);
      }

      if (!['checkbox', 'radio'].includes(input.type)) {
        if (this.options.input_size === 'small') input.classList.add('text-xs');else if (this.options.input_size === 'normal') input.classList.add('text-base');else if (this.options.input_size === 'large') input.classList.add('text-xl');
        group.appendChild(input);
      }

      if (description) group.appendChild(description);
      return group;
    }
  }, {
    key: "getHeaderButtonHolder",
    value: function getHeaderButtonHolder() {
      var el = this.getButtonHolder();
      el.classList.add('text-sm');
      return el;
    }
  }, {
    key: "getButtonHolder",
    value: function getButtonHolder() {
      var el = document.createElement('div');
      el.classList.add('flex', 'relative', 'inline-flex', 'align-middle');
      return el;
    }
  }, {
    key: "getButton",
    value: function getButton(text, icon, title) {
      var el = _get(_getPrototypeOf(tailwindTheme.prototype), "getButton", this).call(this, text, icon, title);

      el.classList.add('inline-block', 'align-middle', 'text-center', 'text-sm', 'bg-blue-700', 'text-white', 'py-1', 'pr-1', 'm-2', 'shadow', 'select-none', 'whitespace-no-wrap', 'rounded');
      return el;
    }
    /* Button for displaying infotext tooltip */

  }, {
    key: "getInfoButton",
    value: function getInfoButton(text) {
      var tooltip = document.createElement('a');
      tooltip.classList.add('tooltips', 'float-right');
      tooltip.innerHTML = 'ⓘ';
      var span = document.createElement('span');
      span.innerHTML = text;
      tooltip.appendChild(span);
      return tooltip;
    }
  }, {
    key: "getTable",
    value: function getTable() {
      var el = _get(_getPrototypeOf(tailwindTheme.prototype), "getTable", this).call(this);

      if (this.options.table_border) el.classList.add('je-table-border');else el.classList.add('table', 'border', 'p-0');
      return el;
    }
  }, {
    key: "getTableRow",
    value: function getTableRow() {
      var el = _get(_getPrototypeOf(tailwindTheme.prototype), "getTableRow", this).call(this);

      if (this.options.table_border) el.classList.add('je-table-border');
      if (this.options.table_zebrastyle) el.classList.add('je-table-zebra');
      return el;
    }
  }, {
    key: "getTableHeaderCell",
    value: function getTableHeaderCell(text) {
      var el = _get(_getPrototypeOf(tailwindTheme.prototype), "getTableHeaderCell", this).call(this, text);

      if (this.options.table_border) el.classList.add('je-table-border');else if (this.options.table_hdiv) el.classList.add('je-table-hdiv');else el.classList.add('text-xs', 'border', 'p-0', 'm-0');
      return el;
    }
  }, {
    key: "getTableCell",
    value: function getTableCell() {
      var el = _get(_getPrototypeOf(tailwindTheme.prototype), "getTableCell", this).call(this);

      if (this.options.table_border) el.classList.add('je-table-border');else if (this.options.table_hdiv) el.classList.add('je-table-hdiv');else el.classList.add('border-0', 'p-0', 'm-0');
      return el;
    }
  }, {
    key: "addInputError",
    value: function addInputError(input, text) {
      if (!input.controlgroup) return;
      input.controlgroup.classList.add('has-error');
      input.classList.add('bg-red-600');

      if (!input.errmsg) {
        input.errmsg = document.createElement('p');
        input.errmsg.classList.add('block', 'mt-1', 'text-xs', 'text-red');
        input.controlgroup.appendChild(input.errmsg);
      } else {
        input.errmsg.style.display = '';
      }

      input.errmsg.textContent = text;
    }
  }, {
    key: "removeInputError",
    value: function removeInputError(input) {
      if (!input.errmsg) return;
      input.errmsg.style.display = 'none';
      input.classList.remove('bg-red-600');
      input.controlgroup.classList.remove('has-error');
    }
  }, {
    key: "getTabHolder",
    value: function getTabHolder(propertyName) {
      var el = document.createElement('div');
      var pName = typeof propertyName === 'undefined' ? '' : propertyName;
      el.innerHTML = "<div class='w-2/12' id='".concat(pName, "'><ul class='list-reset pl-0 mb-0'></ul></div><div class='w-10/12' id='").concat(pName, "'></div>");
      el.classList.add('flex');
      return el;
    }
  }, {
    key: "addTab",
    value: function addTab(holder, tab) {
      holder.children[0].children[0].appendChild(tab);
    }
  }, {
    key: "getTopTabHolder",
    value: function getTopTabHolder(propertyName) {
      var pName = typeof propertyName === 'undefined' ? '' : propertyName;
      var el = document.createElement('div');
      el.innerHTML = "<ul class='nav-tabs flex list-reset pl-0 mb-0 border-b border-grey-light' id='".concat(pName, "'></ul><div class='p-6 block' id='").concat(pName, "'></div>");
      return el;
    }
  }, {
    key: "getTab",
    value: function getTab(text, tabId) {
      var liel = document.createElement('li');
      liel.classList.add('nav-item', 'flex-col', 'text-center', 'text-white', 'bg-blue-500', 'shadow-md', 'border', 'p-2', 'mb-2', 'mr-2', 'hover:bg-blue-400', 'rounded');
      var ael = document.createElement('a');
      ael.classList.add('nav-link', 'text-center');
      ael.setAttribute('href', "#".concat(tabId));
      ael.setAttribute('data-toggle', 'tab');
      ael.appendChild(text);
      liel.appendChild(ael);
      return liel;
    }
  }, {
    key: "getTopTab",
    value: function getTopTab(text, tabId) {
      var el = document.createElement('li');
      el.classList.add('nav-item', 'flex', 'border-l', 'border-t', 'border-r');
      var a = document.createElement('a');
      a.classList.add('nav-link', '-mb-px', 'flex-row', 'text-center', 'bg-white', 'p-2', 'hover:bg-blue-400', 'rounded-t');
      a.setAttribute('href', "#".concat(tabId));
      a.setAttribute('data-toggle', 'tab');
      a.appendChild(text);
      el.appendChild(a);
      return el;
    }
  }, {
    key: "getTabContent",
    value: function getTabContent() {
      var el = document.createElement('div');
      el.setAttribute('role', 'tabpanel');
      return el;
    }
  }, {
    key: "getTopTabContent",
    value: function getTopTabContent() {
      var el = document.createElement('div');
      el.setAttribute('role', 'tabpanel');
      return el;
    }
  }, {
    key: "markTabActive",
    value: function markTabActive(row) {
      row.tab.firstChild.classList.add('block');

      if (row.tab.firstChild.classList.contains('border-b') === true) {
        row.tab.firstChild.classList.add('border-b-0');
        row.tab.firstChild.classList.remove('border-b');
      } else {
        row.tab.firstChild.classList.add('border-b-0');
      }

      if (row.container.classList.contains('hidden') === true) {
        row.container.classList.remove('hidden');
        row.container.classList.add('block');
      } else {
        row.container.classList.add('block');
      }
    }
  }, {
    key: "markTabInactive",
    value: function markTabInactive(row) {
      if (row.tab.firstChild.classList.contains('border-b-0') === true) {
        row.tab.firstChild.classList.add('border-b');
        row.tab.firstChild.classList.remove('border-b-0');
      } else {
        row.tab.firstChild.classList.add('border-b');
      }

      if (row.container.classList.contains('block') === true) {
        row.container.classList.remove('block');
        row.container.classList.add('hidden');
      }
    }
  }, {
    key: "getProgressBar",
    value: function getProgressBar() {
      var min = 0;
      var max = 100;
      var start = 0;
      var container = document.createElement('div');
      container.classList.add('progress');
      var bar = document.createElement('div');
      bar.classList.add('bg-blue', 'leading-none', 'py-1', 'text-xs', 'text-center', 'text-white');
      bar.setAttribute('role', 'progressbar');
      bar.setAttribute('aria-valuenow', start);
      bar.setAttribute('aria-valuemin', min);
      bar.setAttribute('aria-valuenax', max);
      bar.innerHTML = "".concat(start, "%");
      container.appendChild(bar);
      return container;
    }
  }, {
    key: "updateProgressBar",
    value: function updateProgressBar(progressBar, progress) {
      if (!progressBar) return;
      var bar = progressBar.firstChild;
      var percentage = "".concat(progress, "%");
      bar.setAttribute('aria-valuenow', progress);
      bar.style.width = percentage;
      bar.innerHTML = percentage;
    }
  }, {
    key: "updateProgressBarUnknown",
    value: function updateProgressBarUnknown(progressBar) {
      if (!progressBar) return;
      var bar = progressBar.firstChild;
      progressBar.classList.add('progress', 'bg-blue', 'leading-none', 'py-1', 'text-xs', 'text-center', 'text-white', 'block');
      bar.removeAttribute('aria-valuenow');
      bar.classList.add('w-full');
      bar.innerHTML = '';
    }
  }, {
    key: "getInputGroup",
    value: function getInputGroup(input, buttons) {
      if (!input) return;
      var inputGroupContainer = document.createElement('div');
      inputGroupContainer.classList.add('relative', 'items-stretch', 'w-full');
      inputGroupContainer.appendChild(input);
      var inputGroup = document.createElement('div');
      inputGroup.classList.add('-mr-1');
      inputGroupContainer.appendChild(inputGroup);

      for (var i = 0; i < buttons.length; i++) {
        inputGroup.appendChild(buttons[i]);
      }

      return inputGroupContainer;
    }
  }]);

  return tailwindTheme;
}(_theme_js__WEBPACK_IMPORTED_MODULE_16__["AbstractTheme"]);
/* Custom stylesheet rules. (Does not support comma separated selectors) */

/*  Will create a stylesheet in document head with the id "theme-spectre" if not exists. */

tailwindTheme.rules = _tailwind_css_js__WEBPACK_IMPORTED_MODULE_17__["default"];

/***/ }),

/***/ "./src/utilities.js":
/*!**************************!*\
  !*** ./src/utilities.js ***!
  \**************************/
/*! exports provided: isPlainObject, deepCopy, extend, trigger, getShadowParent, hasOwnProperty, isNumber, isInteger */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPlainObject", function() { return isPlainObject; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deepCopy", function() { return deepCopy; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return extend; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "trigger", function() { return trigger; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getShadowParent", function() { return getShadowParent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasOwnProperty", function() { return hasOwnProperty; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumber", function() { return isNumber; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInteger", function() { return isInteger; });
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ "./node_modules/core-js/modules/es.array.is-array.js");
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.date.to-string.js */ "./node_modules/core-js/modules/es.date.to-string.js");
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ "./node_modules/core-js/modules/es.regexp.to-string.js");
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.string.match.js */ "./node_modules/core-js/modules/es.string.match.js");
/* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_parse_float_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.parse-float.js */ "./node_modules/core-js/modules/es.parse-float.js");
/* harmony import */ var core_js_modules_es_parse_float_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_parse_float_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_parse_int_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.parse-int.js */ "./node_modules/core-js/modules/es.parse-int.js");
/* harmony import */ var core_js_modules_es_parse_int_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_parse_int_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17__);



















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

/**
 * Taken from jQuery 2.1.3
 *
 * #### NOTE
 * Not plain objects is,
 * - Any object or value whose internal [[Class]] property is not "[object Object]"
 * - DOM nodes
 * - window
 *
 * @param {Object} obj - Variable name
 * @returns {Boolean}
 */
function isPlainObject(obj) {
  if (obj === null) return false;
  if (_typeof(obj) !== 'object' || obj.nodeType || obj === obj.window) return false;
  if (obj.constructor && !hasOwnProperty(obj.constructor.prototype, 'isPrototypeOf')) return false;
  /* Most likely |obj| is a plain object, created by {} or constructed with new Object */

  return true;
}
function deepCopy(target) {
  return isPlainObject(target) ? extend({}, target) : Array.isArray(target) ? target.map(deepCopy) : target;
}
function extend(destination) {
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    args[_key - 1] = arguments[_key];
  }

  args.forEach(function (source) {
    if (source) {
      Object.keys(source).forEach(function (property) {
        if (source[property] && isPlainObject(source[property])) {
          if (!hasOwnProperty(destination, property)) destination[property] = {};
          extend(destination[property], source[property]);
        } else if (Array.isArray(source[property])) {
          destination[property] = deepCopy(source[property]);
        } else {
          destination[property] = source[property];
        }
      });
    }
  });
  return destination;
}
function trigger(el, event) {
  var e = document.createEvent('HTMLEvents');
  e.initEvent(event, true, true);
  el.dispatchEvent(e);
}
/**
 * Helper function to locate a shadowRoot parent if at all
 *
 * @param {Element} node - Node
 */

function getShadowParent(node) {
  return node && (node.toString() === '[object ShadowRoot]' ? node : getShadowParent(node.parentNode));
}
/**
 * Helper function to check own property key
 *
 * @see https://eslint.org/docs/rules/no-prototype-builtins
 */

function hasOwnProperty(obj, key) {
  return obj && Object.prototype.hasOwnProperty.call(obj, key);
} // From https://github.com/angular/angular.js/blob/master/src/ng/directive/input.js

var NUMBER_REGEXP = /^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/;
function isNumber(value) {
  if (typeof value === 'undefined' || value === null) return false;
  var match = value.match(NUMBER_REGEXP);
  var v = parseFloat(value);
  return match !== null && !isNaN(v) && isFinite(v);
}
var INTEGER_REGEXP = /^\s*(-|\+)?(\d+)\s*$/;
function isInteger(value) {
  if (typeof value === 'undefined' || value === null) return false;
  var match = value.match(INTEGER_REGEXP);
  var v = parseInt(value);
  return match !== null && !isNaN(v) && isFinite(v);
}

/***/ }),

/***/ "./src/validator.js":
/*!**************************!*\
  !*** ./src/validator.js ***!
  \**************************/
/*! exports provided: Validator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Validator", function() { return Validator; });
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ "./node_modules/core-js/modules/es.array.is-array.js");
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_array_some_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.some.js */ "./node_modules/core-js/modules/es.array.some.js");
/* harmony import */ var core_js_modules_es_array_some_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_some_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.reduce.js */ "./node_modules/core-js/modules/es.array.reduce.js");
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ "./node_modules/core-js/modules/es.regexp.constructor.js");
/* harmony import */ var core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ "./node_modules/core-js/modules/es.regexp.to-string.js");
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.entries.js */ "./node_modules/core-js/modules/es.object.entries.js");
/* harmony import */ var core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_array_every_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.array.every.js */ "./node_modules/core-js/modules/es.array.every.js");
/* harmony import */ var core_js_modules_es_array_every_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_every_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.string.match.js */ "./node_modules/core-js/modules/es.string.match.js");
/* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var core_js_modules_es_parse_int_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.parse-int.js */ "./node_modules/core-js/modules/es.parse-int.js");
/* harmony import */ var core_js_modules_es_parse_int_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_parse_int_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.string.replace.js */ "./node_modules/core-js/modules/es.string.replace.js");
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.array.join.js */ "./node_modules/core-js/modules/es.array.join.js");
/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_19__);
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_20__);
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_21__);
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_22__);
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_23__);
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_24__);
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_25__);
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_26__);
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js");
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_27__);
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_28__);
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_29__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_30__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_31__);
/* harmony import */ var core_js_modules_es_object_define_properties_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! core-js/modules/es.object.define-properties.js */ "./node_modules/core-js/modules/es.object.define-properties.js");
/* harmony import */ var core_js_modules_es_object_define_properties_js__WEBPACK_IMPORTED_MODULE_32___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_properties_js__WEBPACK_IMPORTED_MODULE_32__);
/* harmony import */ var _validators_ip_validator_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./validators/ip-validator.js */ "./src/validators/ip-validator.js");
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./utilities.js */ "./src/utilities.js");
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }

function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }

function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

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



































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); return Constructor; }



var Validator = /*#__PURE__*/function () {
  function Validator(jsoneditor, schema, options, defaults) {
    _classCallCheck(this, Validator);

    this.jsoneditor = jsoneditor;
    this.schema = schema || this.jsoneditor.schema;
    this.options = options || {};
    this.translate = this.jsoneditor.translate || defaults.translate;
    this.translateProperty = this.jsoneditor.translateProperty || defaults.translateProperty;
    this.defaults = defaults;
    this._validateSubSchema = {
      "const": function _const(schema, value, path) {
        var valid = JSON.stringify(schema["const"]) === JSON.stringify(value) && !(Array.isArray(value) || _typeof(value) === 'object');

        if (!valid) {
          return [{
            path: path,
            property: 'const',
            message: this.translate('error_const')
          }];
        }

        return [];
      },
      "enum": function _enum(schema, value, path) {
        var stringified = JSON.stringify(value);
        var valid = schema["enum"].some(function (e) {
          return stringified === JSON.stringify(e);
        });

        if (!valid) {
          return [{
            path: path,
            property: 'enum',
            message: this.translate('error_enum')
          }];
        }

        return [];
      },
      "extends": function _extends(schema, value, path) {
        var _this = this;

        var validate = function validate(errors, e) {
          errors.push.apply(errors, _toConsumableArray(_this._validateSchema(e, value, path)));
          return errors;
        };

        return schema["extends"].reduce(validate, []);
      },
      allOf: function allOf(schema, value, path) {
        var _this2 = this;

        var validate = function validate(errors, e) {
          errors.push.apply(errors, _toConsumableArray(_this2._validateSchema(e, value, path)));
          return errors;
        };

        return schema.allOf.reduce(validate, []);
      },
      anyOf: function anyOf(schema, value, path) {
        var _this3 = this;

        var valid = schema.anyOf.some(function (e) {
          return !_this3._validateSchema(e, value, path).length;
        });

        if (!valid) {
          return [{
            path: path,
            property: 'anyOf',
            message: this.translate('error_anyOf')
          }];
        }

        return [];
      },
      oneOf: function oneOf(schema, value, path) {
        var _this4 = this;

        var valid = 0;
        var oneofErrors = [];
        schema.oneOf.forEach(function (o, i) {
          /* Set the error paths to be path.oneOf[i].rest.of.path */
          var tmp = _this4._validateSchema(o, value, path);

          if (!tmp.length) {
            valid++;
          }

          tmp.forEach(function (e) {
            e.path = "".concat(path, ".oneOf[").concat(i, "]").concat(e.path.substr(path.length));
          });
          oneofErrors.push.apply(oneofErrors, _toConsumableArray(tmp));
        });
        var errors = [];

        if (valid !== 1) {
          errors.push({
            path: path,
            property: 'oneOf',
            message: this.translate('error_oneOf', [valid])
          });
          errors.push.apply(errors, oneofErrors);
        }

        return errors;
      },
      not: function not(schema, value, path) {
        if (!this._validateSchema(schema.not, value, path).length) {
          return [{
            path: path,
            property: 'not',
            message: this.translate('error_not')
          }];
        }

        return [];
      },
      type: function type(schema, value, path) {
        var _this5 = this;

        /* Union type */
        if (Array.isArray(schema.type)) {
          var valid = schema.type.some(function (e) {
            return _this5._checkType(e, value);
          });

          if (!valid) {
            return [{
              path: path,
              property: 'type',
              message: this.translate('error_type_union')
            }];
          }
        } else {
          /* Simple type */
          if (['date', 'time', 'datetime-local'].includes(schema.format) && schema.type === 'integer') {
            /* Hack to get validator to validate as string even if value is integer */

            /* As validation of 'date', 'time', 'datetime-local' is done in separate validator */
            if (!this._checkType('string', "".concat(value))) {
              return [{
                path: path,
                property: 'type',
                message: this.translate('error_type', [schema.format])
              }];
            }
          } else if (!this._checkType(schema.type, value)) {
            return [{
              path: path,
              property: 'type',
              message: this.translate('error_type', [schema.type])
            }];
          }
        }

        return [];
      },
      disallow: function disallow(schema, value, path) {
        var _this6 = this;

        /* Union type */
        if (Array.isArray(schema.disallow)) {
          var invalid = schema.disallow.some(function (e) {
            return _this6._checkType(e, value);
          });

          if (invalid) {
            return [{
              path: path,
              property: 'disallow',
              message: this.translate('error_disallow_union')
            }];
          }
        } else {
          /* Simple type */
          if (this._checkType(schema.disallow, value)) {
            return [{
              path: path,
              property: 'disallow',
              message: this.translate('error_disallow', [schema.disallow])
            }];
          }
        }

        return [];
      }
    };
    this._validateNumberSubSchema = {
      multipleOf: function multipleOf(schema, value, path) {
        return this._validateNumberSubSchemaMultipleDivisible(schema, value, path);
      },
      divisibleBy: function divisibleBy(schema, value, path) {
        return this._validateNumberSubSchemaMultipleDivisible(schema, value, path);
      },
      maximum: function maximum(schema, value, path) {
        /* Vanilla JS, prone to floating point rounding errors (e.g. .999999999999999 == 1) */
        var valid = schema.exclusiveMaximum ? value < schema.maximum : value <= schema.maximum;
        /* Use math.js is available */

        if (window.math) {
          valid = window.math[schema.exclusiveMaximum ? 'smaller' : 'smallerEq'](window.math.bignumber(value), window.math.bignumber(schema.maximum));
        } else if (window.Decimal) {
          /* Use Decimal.js if available */
          valid = new window.Decimal(value)[schema.exclusiveMaximum ? 'lt' : 'lte'](new window.Decimal(schema.maximum));
        }

        if (!valid) {
          return [{
            path: path,
            property: 'maximum',
            message: this.translate(schema.exclusiveMaximum ? 'error_maximum_excl' : 'error_maximum_incl', [schema.maximum])
          }];
        }

        return [];
      },
      minimum: function minimum(schema, value, path) {
        /* Vanilla JS, prone to floating point rounding errors (e.g. .999999999999999 == 1) */
        var valid = schema.exclusiveMinimum ? value > schema.minimum : value >= schema.minimum;
        /* Use math.js is available */

        if (window.math) {
          valid = window.math[schema.exclusiveMinimum ? 'larger' : 'largerEq'](window.math.bignumber(value), window.math.bignumber(schema.minimum));
          /* Use Decimal.js if available */
        } else if (window.Decimal) {
          valid = new window.Decimal(value)[schema.exclusiveMinimum ? 'gt' : 'gte'](new window.Decimal(schema.minimum));
        }

        if (!valid) {
          return [{
            path: path,
            property: 'minimum',
            message: this.translate(schema.exclusiveMinimum ? 'error_minimum_excl' : 'error_minimum_incl', [schema.minimum])
          }];
        }

        return [];
      }
    };
    this._validateStringSubSchema = {
      maxLength: function maxLength(schema, value, path) {
        var errors = [];

        if ("".concat(value).length > schema.maxLength) {
          errors.push({
            path: path,
            property: 'maxLength',
            message: this.translate('error_maxLength', [schema.maxLength])
          });
        }

        return errors;
      },

      /* `minLength` */
      minLength: function minLength(schema, value, path) {
        if ("".concat(value).length < schema.minLength) {
          return [{
            path: path,
            property: 'minLength',
            message: this.translate(schema.minLength === 1 ? 'error_notempty' : 'error_minLength', [schema.minLength])
          }];
        }

        return [];
      },

      /* `pattern` */
      pattern: function pattern(schema, value, path) {
        if (!new RegExp(schema.pattern).test(value)) {
          return [{
            path: path,
            property: 'pattern',
            message: schema.options && schema.options.patternmessage ? schema.options.patternmessage : this.translate('error_pattern', [schema.pattern])
          }];
        }

        return [];
      }
    };
    this._validateArraySubSchema = {
      items: function items(schema, value, path) {
        var _this7 = this;

        var errors = [];

        if (Array.isArray(schema.items)) {
          for (var i = 0; i < value.length; i++) {
            /* If this item has a specific schema tied to it */

            /* Validate against it */
            if (schema.items[i]) {
              errors.push.apply(errors, _toConsumableArray(this._validateSchema(schema.items[i], value[i], "".concat(path, ".").concat(i))));
              /* If all additional items are allowed */
            } else if (schema.additionalItems === true) {
              break;
              /* If additional items is a schema */

              /* TODO: Incompatibility between version 3 and 4 of the spec */
            } else if (schema.additionalItems) {
              errors.push.apply(errors, _toConsumableArray(this._validateSchema(schema.additionalItems, value[i], "".concat(path, ".").concat(i))));
              /* If no additional items are allowed */
            } else if (schema.additionalItems === false) {
              errors.push({
                path: path,
                property: 'additionalItems',
                message: this.translate('error_additionalItems')
              });
              break;
              /* Default for `additionalItems` is an empty schema */
            } else {
              break;
            }
          }
          /* `items` is a schema */

        } else {
          /* Each item in the array must validate against the schema */
          value.forEach(function (e, i) {
            errors.push.apply(errors, _toConsumableArray(_this7._validateSchema(schema.items, e, "".concat(path, ".").concat(i))));
          });
        }

        return errors;
      },
      maxItems: function maxItems(schema, value, path) {
        if (value.length > schema.maxItems) {
          return [{
            path: path,
            property: 'maxItems',
            message: this.translate('error_maxItems', [schema.maxItems])
          }];
        }

        return [];
      },
      minItems: function minItems(schema, value, path) {
        if (value.length < schema.minItems) {
          return [{
            path: path,
            property: 'minItems',
            message: this.translate('error_minItems', [schema.minItems])
          }];
        }

        return [];
      },
      uniqueItems: function uniqueItems(schema, value, path) {
        var seen = {};

        for (var i = 0; i < value.length; i++) {
          var valid = JSON.stringify(value[i]);

          if (seen[valid]) {
            return [{
              path: path,
              property: 'uniqueItems',
              message: this.translate('error_uniqueItems')
            }];
          }

          seen[valid] = true;
        }

        return [];
      }
    };
    this._validateObjectSubSchema = {
      maxProperties: function maxProperties(schema, value, path) {
        if (Object.keys(value).length > schema.maxProperties) {
          return [{
            path: path,
            property: 'maxProperties',
            message: this.translate('error_maxProperties', [schema.maxProperties])
          }];
        }

        return [];
      },
      minProperties: function minProperties(schema, value, path) {
        if (Object.keys(value).length < schema.minProperties) {
          return [{
            path: path,
            property: 'minProperties',
            message: this.translate('error_minProperties', [schema.minProperties])
          }];
        }

        return [];
      },
      required: function required(schema, value, path) {
        var _this8 = this;

        var errors = [];

        if (Array.isArray(schema.required)) {
          schema.required.forEach(function (e) {
            if (typeof value[e] !== 'undefined') return;

            var editor = _this8.jsoneditor.getEditor("".concat(path, ".").concat(e));

            if (editor && editor.dependenciesFulfilled === false) return;
            /* Ignore required error if editor is of type "button" or "info" */

            if (editor && ['button', 'info'].includes(editor.schema.format || editor.schema.type)) return;
            errors.push({
              path: path,
              property: 'required',
              message: _this8.translate('error_required', [schema && schema.properties && schema.properties[e] && schema.properties[e].title ? schema.properties[e].title : e])
            });
          });
        }

        return errors;
      },
      properties: function properties(schema, value, path, validatedProperties) {
        var _this9 = this;

        var errors = [];
        Object.entries(schema.properties).forEach(function (_ref) {
          var _ref2 = _slicedToArray(_ref, 2),
              key = _ref2[0],
              prop = _ref2[1];

          validatedProperties[key] = true;
          errors.push.apply(errors, _toConsumableArray(_this9._validateSchema(prop, value[key], "".concat(path, ".").concat(key))));
        });
        return errors;
      },
      patternProperties: function patternProperties(schema, value, path, validatedProperties) {
        var _this10 = this;

        var errors = [];
        Object.entries(schema.patternProperties).forEach(function (_ref3) {
          var _ref4 = _slicedToArray(_ref3, 2),
              i = _ref4[0],
              prop = _ref4[1];

          var regex = new RegExp(i);
          /* Check which properties match */

          Object.entries(value).forEach(function (_ref5) {
            var _ref6 = _slicedToArray(_ref5, 2),
                j = _ref6[0],
                v = _ref6[1];

            if (regex.test(j)) {
              validatedProperties[j] = true;
              errors.push.apply(errors, _toConsumableArray(_this10._validateSchema(prop, v, "".concat(path, ".").concat(j))));
            }
          });
        });
        return errors;
      }
    };
    this._validateObjectSubSchema2 = {
      propertyNames: function propertyNames(schema, value, path, validatedProperties) {
        var _this11 = this;

        var errors = [];
        var keys = Object.keys(value);
        var k = null;

        var _loop = function _loop(i) {
          var msg = '';
          var truthy = false;
          k = keys[i];
          /* Check property names that don't match */

          if (typeof schema.propertyNames === 'boolean') {
            if (schema.propertyNames === true) {
              return "continue";
            }

            errors.push({
              path: path,
              property: 'propertyNames',
              message: _this11.translate('error_property_names_false', [k])
            });
            return "break";
          }

          truthy = Object.entries(schema.propertyNames).every(function (_ref7) {
            var _ref8 = _slicedToArray(_ref7, 2),
                j = _ref8[0],
                prop = _ref8[1];

            var match = false;
            var regex = null;

            switch (j) {
              case 'maxLength':
                if (typeof prop !== 'number') {
                  msg = 'error_property_names_maxlength';
                  break;
                }

                if (k.length > prop) {
                  msg = 'error_property_names_exceeds_maxlength';
                  break;
                }

                return true;

              case 'const':
                if (prop !== k) {
                  msg = 'error_property_names_const_mismatch';
                  break;
                }

                return true;

              case 'enum':
                if (!Array.isArray(prop)) {
                  msg = 'error_property_names_enum';
                  break;
                }

                prop.forEach(function (p) {
                  if (p === k) {
                    match = true;
                  }
                });

                if (!match) {
                  msg = 'error_property_names_enum_mismatch';
                  break;
                }

                return true;

              case 'pattern':
                if (typeof prop !== 'string') {
                  msg = 'error_property_names_pattern';
                  break;
                }

                regex = new RegExp(prop);

                if (!regex.test(k)) {
                  msg = 'error_property_names_pattern_mismatch';
                  break;
                }

                return true;

              default:
                errors.push({
                  path: path,
                  property: 'propertyNames',
                  message: _this11.translate('error_property_names_unsupported', [j])
                });
                return false;
            }

            errors.push({
              path: path,
              property: 'propertyNames',
              message: _this11.translate(msg, [k])
            });
            return false;
          });
          if (!truthy) return "break";
        };

        for (var i = 0; i < keys.length; i++) {
          var _ret = _loop(i);

          if (_ret === "continue") continue;
          if (_ret === "break") break;
        }

        return errors;
      },
      additionalProperties: function additionalProperties(schema, value, path, validatedProperties) {
        var errors = [];
        var keys = Object.keys(value);

        for (var i = 0; i < keys.length; i++) {
          var k = keys[i];
          if (validatedProperties[k]) continue;
          /* No extra properties allowed */

          if (!schema.additionalProperties) {
            errors.push({
              path: path,
              property: 'additionalProperties',
              message: this.translate('error_additional_properties', [k])
            });
            break;
            /* Allowed */
          } else if (schema.additionalProperties === true) {
            break;
            /* Must match schema */

            /* TODO: incompatibility between version 3 and 4 of the spec */
          } else {
            errors.push.apply(errors, _toConsumableArray(this._validateSchema(schema.additionalProperties, value[k], "".concat(path, ".").concat(k))));
          }
        }

        return errors;
      },
      dependencies: function dependencies(schema, value, path) {
        var _this12 = this;

        var errors = [];
        Object.entries(schema.dependencies).forEach(function (_ref9) {
          var _ref10 = _slicedToArray(_ref9, 2),
              i = _ref10[0],
              dep = _ref10[1];

          /* Doesn't need to meet the dependency */
          if (typeof value[i] === 'undefined') return;
          /* Property dependency */

          if (Array.isArray(dep)) {
            dep.forEach(function (d) {
              if (typeof value[d] === 'undefined') {
                errors.push({
                  path: path,
                  property: 'dependencies',
                  message: _this12.translate('error_dependency', [d])
                });
              }
            });
            /* Schema dependency */
          } else {
            errors.push.apply(errors, _toConsumableArray(_this12._validateSchema(dep, value, path)));
          }
        });
        return errors;
      }
    };
  }

  _createClass(Validator, [{
    key: "fitTest",
    value: function fitTest(value, givenSchema) {
      var weight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10000000;
      var fit = {
        match: 0,
        extra: 0
      };

      if (_typeof(value) === 'object' && value !== null) {
        /* Work on a copy of the schema */
        var schema = this._getSchema(givenSchema);
        /* If the schema is an anyOf declaration, do use the properties of the allowed sub schemata instead.
        Of these sub schemata, the best fit is selected */


        if (schema.anyOf) {
          var bestFit = _objectSpread({}, fit);

          var _iterator = _createForOfIteratorHelper(schema.anyOf),
              _step;

          try {
            for (_iterator.s(); !(_step = _iterator.n()).done;) {
              var subSchema = _step.value;
              var subFit = this.fitTest(value, subSchema, weight);
              /* The best fit is the one with the best value for match. If there are multiple results
              with the same match value, use the one with the least number of extra properties */

              if (subFit.match > bestFit.match || subFit.match === bestFit.match && subFit.extra < bestFit.extra) {
                bestFit = subFit;
              }
            }
          } catch (err) {
            _iterator.e(err);
          } finally {
            _iterator.f();
          }

          return bestFit;
        } else {
          var properties = this._getSchema(givenSchema).properties;

          for (var i in properties) {
            if (!Object(_utilities_js__WEBPACK_IMPORTED_MODULE_34__["hasOwnProperty"])(properties, i)) {
              fit.extra += weight;
              continue;
            }

            if (_typeof(value[i]) === 'object' && _typeof(properties[i]) === 'object' && _typeof(properties[i].properties) === 'object') {
              var result = this.fitTest(value[i], properties[i], weight / 100);
              fit.match += result.match;
              fit.extra += result.extra;
            }

            if (typeof value[i] !== 'undefined') {
              fit.match += weight;
            }
          }
        }
      }

      return fit;
    }
  }, {
    key: "_getSchema",
    value: function _getSchema(schema) {
      return typeof schema === 'undefined' ? Object(_utilities_js__WEBPACK_IMPORTED_MODULE_34__["extend"])({}, this.jsoneditor.expandRefs(this.schema)) : schema;
    }
  }, {
    key: "validate",
    value: function validate(value) {
      return this._validateSchema(this.schema, value);
    }
  }, {
    key: "_validateSchema",
    value: function _validateSchema(schema, value, path) {
      var _this13 = this;

      var errors = [];
      path = path || this.jsoneditor.root.formname;
      /* Work on a copy of the schema */

      schema = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_34__["extend"])({}, this.jsoneditor.expandRefs(schema));
      /*
       * Type Agnostic Validation
       */

      /* Version 3 `required` and `required_by_default` */

      if (typeof value === 'undefined') {
        return this._validateV3Required(schema, value, path);
      }

      Object.keys(schema).forEach(function (key) {
        if (_this13._validateSubSchema[key]) {
          errors.push.apply(errors, _toConsumableArray(_this13._validateSubSchema[key].call(_this13, schema, value, path)));
        }
      });
      /*
       * Type Specific Validation
       */

      errors.push.apply(errors, _toConsumableArray(this._validateByValueType(schema, value, path)));

      if (schema.links) {
        schema.links.forEach(function (s, m) {
          if (s.rel && s.rel.toLowerCase() === 'describedby') {
            schema = _this13._expandSchemaLink(schema, m);
            errors.push.apply(errors, _toConsumableArray(_this13._validateSchema(schema, value, path, _this13.translate)));
          }
        });
      }
      /* date, time and datetime-local validation */


      if (['date', 'time', 'datetime-local'].includes(schema.format)) {
        errors.push.apply(errors, _toConsumableArray(this._validateDateTimeSubSchema(schema, value, path)));
      }
      /* uuid validation */


      if (['uuid'].includes(schema.format)) {
        errors.push.apply(errors, _toConsumableArray(this._validateUUIDSchema(schema, value, path)));
      }
      /* custom validator */


      errors.push.apply(errors, _toConsumableArray(this._validateCustomValidator(schema, value, path)));
      /* Remove duplicate errors and add "errorcount" property */

      return this._removeDuplicateErrors(errors);
    }
  }, {
    key: "_expandSchemaLink",
    value: function _expandSchemaLink(schema, m) {
      var href = schema.links[m].href;
      var data = this.jsoneditor.root.getValue();
      var template = this.jsoneditor.compileTemplate(href, this.jsoneditor.template);
      var ref = document.location.origin + document.location.pathname + template(data);
      schema.links = schema.links.slice(0, m).concat(schema.links.slice(m + 1));
      return Object(_utilities_js__WEBPACK_IMPORTED_MODULE_34__["extend"])({}, schema, this.jsoneditor.refs[ref]);
    }
  }, {
    key: "_validateV3Required",
    value: function _validateV3Required(schema, value, path) {
      if ((typeof schema.required !== 'undefined' && schema.required === true || typeof schema.required === 'undefined' && this.jsoneditor.options.required_by_default === true) && schema.type !== 'info') {
        return [{
          path: path,
          property: 'required',
          message: this.translate('error_notset')
        }];
      }

      return [];
    }
  }, {
    key: "_validateByValueType",
    value: function _validateByValueType(schema, value, path) {
      var _this14 = this;

      var errors = [];
      if (value === null) return errors;
      /* Number Specific Validation */

      if (typeof value === 'number') {
        /* `multipleOf` and `divisibleBy` */

        /* `maximum` */

        /* `minimum` */
        Object.keys(schema).forEach(function (key) {
          if (_this14._validateNumberSubSchema[key]) {
            errors.push.apply(errors, _toConsumableArray(_this14._validateNumberSubSchema[key].call(_this14, schema, value, path)));
          }
        });
        /* String specific validation */
      } else if (typeof value === 'string') {
        /* `maxLength` */

        /* `minLength` */

        /* `pattern` */
        Object.keys(schema).forEach(function (key) {
          if (_this14._validateStringSubSchema[key]) {
            errors.push.apply(errors, _toConsumableArray(_this14._validateStringSubSchema[key].call(_this14, schema, value, path)));
          }
        });
        /* Array specific validation */
      } else if (Array.isArray(value)) {
        /* `items` and `additionalItems`
        /* `maxItems`
        /* `minItems`
        /* `uniqueItems` */
        Object.keys(schema).forEach(function (key) {
          if (_this14._validateArraySubSchema[key]) {
            errors.push.apply(errors, _toConsumableArray(_this14._validateArraySubSchema[key].call(_this14, schema, value, path)));
          }
        });
        /* Object specific validation */
      } else if (_typeof(value) === 'object') {
        var validatedProperties = {};
        /* `maxProperties`
        /* `minProperties`
        /*  Version 4 `required`
        /* `properties`
        /* `patternProperties` */

        Object.keys(schema).forEach(function (key) {
          if (_this14._validateObjectSubSchema[key]) {
            errors.push.apply(errors, _toConsumableArray(_this14._validateObjectSubSchema[key].call(_this14, schema, value, path, validatedProperties)));
          }
        });
        /* The no_additional_properties option currently doesn't work with extended schemas that use oneOf or anyOf or allOf */

        if (typeof schema.additionalProperties === 'undefined' && this.jsoneditor.options.no_additional_properties && !schema.oneOf && !schema.anyOf && !schema.allOf) {
          schema.additionalProperties = false;
        }
        /* `additionalProperties` */

        /* `dependencies` */


        Object.keys(schema).forEach(function (key) {
          if (typeof _this14._validateObjectSubSchema2[key] !== 'undefined') {
            errors.push.apply(errors, _toConsumableArray(_this14._validateObjectSubSchema2[key].call(_this14, schema, value, path, validatedProperties)));
          }
        });
      }

      return errors;
    }
  }, {
    key: "_validateUUIDSchema",
    value: function _validateUUIDSchema(schema, value, path) {
      if (!/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value)) {
        return [{
          path: path,
          property: 'format',
          message: this.translate('error_pattern', ['^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$'])
        }];
      }

      return [];
    }
  }, {
    key: "_validateNumberSubSchemaMultipleDivisible",
    value: function _validateNumberSubSchemaMultipleDivisible(schema, value, path) {
      var divisor = schema.multipleOf || schema.divisibleBy;
      /* Vanilla JS, prone to floating point rounding errors (e.g. 1.14 / .01 == 113.99999) */

      var valid = value / divisor === Math.floor(value / divisor);
      /* Use math.js is available */

      if (window.math) {
        valid = window.math.mod(window.math.bignumber(value), window.math.bignumber(divisor)).equals(0);
      } else if (window.Decimal) {
        /* Use decimal.js is available */
        valid = new window.Decimal(value).mod(new window.Decimal(divisor)).equals(0);
      }

      if (!valid) {
        return [{
          path: path,
          property: schema.multipleOf ? 'multipleOf' : 'divisibleBy',
          message: this.translate('error_multipleOf', [divisor])
        }];
      }

      return [];
    }
  }, {
    key: "_validateDateTimeSubSchema",
    value: function _validateDateTimeSubSchema(schema, value, path) {
      var _this15 = this;

      var _validateInteger = function _validateInteger(schema, value, path) {
        /* The value is a timestamp */
        if (value * 1 < 1) {
          /* If value is less than 1, then it's an invalid epoch date before 00:00:00 UTC Thursday, 1 January 1970 */
          return [{
            path: path,
            property: 'format',
            message: _this15.translate('error_invalid_epoch')
          }];
        } else if (value !== Math.abs(parseInt(value))) {
          /* not much to check for, so we assume value is ok if it's a positive number */
          return [{
            path: path,
            property: 'format',
            message: _this15.translate("error_".concat(schema.format.replace(/-/g, '_')), [dateFormat])
          }];
        }

        return [];
      };

      var _validateFlatPicker = function _validateFlatPicker(schema, value, path, editor) {
        if (value !== '') {
          var compareValue;

          if (editor.flatpickr.config.mode !== 'single') {
            var seperator = editor.flatpickr.config.mode === 'range' ? editor.flatpickr.l10n.rangeSeparator : ', ';
            var selectedDates = editor.flatpickr.selectedDates.map(function (val) {
              return editor.flatpickr.formatDate(val, editor.flatpickr.config.dateFormat);
            });
            compareValue = selectedDates.join(seperator);
          }

          try {
            if (compareValue) {
              /* Not the best validation method, but range and multiple mode are special */

              /* Optimal solution would be if it is possible to change the return format from string/integer to array */
              if (compareValue !== value) throw new Error("".concat(editor.flatpickr.config.mode, " mismatch"));
            } else if (editor.flatpickr.formatDate(editor.flatpickr.parseDate(value, editor.flatpickr.config.dateFormat), editor.flatpickr.config.dateFormat) !== value) {
              throw new Error('mismatch');
            }
          } catch (err) {
            var errorDateFormat = editor.flatpickr.config.errorDateFormat !== undefined ? editor.flatpickr.config.errorDateFormat : editor.flatpickr.config.dateFormat;
            return [{
              path: path,
              property: 'format',
              message: _this15.translate("error_".concat(editor.format.replace(/-/g, '_')), [errorDateFormat])
            }];
          }
        }

        return [];
      };

      var validatorRx = {
        date: /^(\d{4}\D\d{2}\D\d{2})?$/,
        time: /^(\d{2}:\d{2}(?::\d{2})?)?$/,
        'datetime-local': /^(\d{4}\D\d{2}\D\d{2}[ T]\d{2}:\d{2}(?::\d{2})?)?$/
      };
      var format = {
        date: '"YYYY-MM-DD"',
        time: '"HH:MM"',
        'datetime-local': '"YYYY-MM-DD HH:MM"'
      };
      var editor = this.jsoneditor.getEditor(path);
      var dateFormat = editor && editor.flatpickr ? editor.flatpickr.config.dateFormat : format[schema.format];

      if (schema.type === 'integer') {
        return _validateInteger(schema, value, path);
      } else if (!editor || !editor.flatpickr) {
        /* Standard string input, without flatpickr */
        if (!validatorRx[schema.format].test(value)) {
          return [{
            path: path,
            property: 'format',
            message: this.translate("error_".concat(schema.format.replace(/-/g, '_')), [dateFormat])
          }];
        }
      } else if (editor) {
        /* Flatpickr validation */
        return _validateFlatPicker(schema, value, path, editor);
      }

      return [];
    }
  }, {
    key: "_validateCustomValidator",
    value: function _validateCustomValidator(schema, value, path) {
      var _this16 = this;

      var errors = [];
      /* Internal validators using the custom validator format */

      errors.push.apply(errors, _toConsumableArray(_validators_ip_validator_js__WEBPACK_IMPORTED_MODULE_33__["ipValidator"].call(this, schema, value, path, this.translate)));

      var validate = function validate(validator) {
        errors.push.apply(errors, _toConsumableArray(validator.call(_this16, schema, value, path)));
      };
      /* Custom type validation (global) */


      this.defaults.custom_validators.forEach(validate);
      /* Custom type validation (instance specific) */

      if (this.options.custom_validators) {
        this.options.custom_validators.forEach(validate);
      }

      return errors;
    }
  }, {
    key: "_removeDuplicateErrors",
    value: function _removeDuplicateErrors(errors) {
      return errors.reduce(function (err, obj) {
        var first = true;
        if (!err) err = [];
        err.forEach(function (a) {
          if (a.message === obj.message && a.path === obj.path && a.property === obj.property) {
            a.errorcount++;
            first = false;
          }
        });

        if (first) {
          obj.errorcount = 1;
          err.push(obj);
        }

        return err;
      }, []);
    }
  }, {
    key: "_checkType",
    value: function _checkType(type, value) {
      var types = {
        string: function string(value) {
          return typeof value === 'string';
        },
        number: function number(value) {
          return typeof value === 'number';
        },
        integer: function integer(value) {
          return typeof value === 'number' && value === Math.floor(value);
        },
        "boolean": function boolean(value) {
          return typeof value === 'boolean';
        },
        array: function array(value) {
          return Array.isArray(value);
        },
        object: function object(value) {
          return value !== null && !Array.isArray(value) && _typeof(value) === 'object';
        },
        "null": function _null(value) {
          return value === null;
        }
      };
      /* Simple types */

      if (typeof type === 'string') {
        if (types[type]) {
          return types[type](value);
        } else return true;
        /* Schema */

      } else {
        return !this._validateSchema(type, value).length;
      }
    }
  }]);

  return Validator;
}();

/***/ }),

/***/ "./src/validators/ip-validator.js":
/*!****************************************!*\
  !*** ./src/validators/ip-validator.js ***!
  \****************************************/
/*! exports provided: ipValidator */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ipValidator", function() { return ipValidator; });
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.string.split.js */ "./node_modules/core-js/modules/es.string.split.js");
/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.string.match.js */ "./node_modules/core-js/modules/es.string.match.js");
/* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_4__);






/* Implements ipv4, ipv6 and hostname format validations as per https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-7.3.4 */
var validateIpv4 = function validateIpv4(value) {
  var parts = value.split('.');

  if (parts.length !== 4) {
    throw new Error('error_ipv4');
  }

  parts.forEach(function (part) {
    if (isNaN(+part) || +part < 0 || +part > 255) {
      throw new Error('error_ipv4');
    }
  });
};

var validateIpv6 = function validateIpv6(value) {
  if (!value.match('^(?:(?:(?:[a-fA-F0-9]{1,4}:){6}|(?=(?:[a-fA-F0-9]{0,4}:){2,6}(?:[0-9]{1,3}.){3}[0-9]{1,3}$)(([0-9a-fA-F]{1,4}:){1,5}|:)((:[0-9a-fA-F]{1,4}){1,5}:|:)|::(?:[a-fA-F0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4}|(?=(?:[a-fA-F0-9]{0,4}:){0,7}[a-fA-F0-9]{0,4}$)(([0-9a-fA-F]{1,4}:){1,7}|:)((:[0-9a-fA-F]{1,4}){1,7}|:)|(?:[a-fA-F0-9]{1,4}:){7}:|:(:[a-fA-F0-9]{1,4}){7})$')) {
    throw new Error('error_ipv6');
  }
};

var validateHostname = function validateHostname(value) {
  if (!value.match('(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9].)+[a-zA-Z]{2,63}$)')) {
    throw new Error('error_hostname');
  }
};

function ipValidator(schema, value, path, translate) {
  try {
    switch (schema.format) {
      case 'ipv4':
        validateIpv4(value);
        break;

      case 'ipv6':
        validateIpv6(value);
        break;

      case 'hostname':
        validateHostname(value);
        break;
    }

    return [];
  } catch (err) {
    return [{
      path: path,
      property: 'format',
      message: translate(err.message)
    }];
  }
}

/***/ })

/******/ });
});
/*
//@ sourceMappingURL=jsoneditor.js.map
*/
