(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory(require("fontawesome-svg-core"), require("free-brands-svg-icons"), require("free-solid-svg-icons"), require("MaterialUI"), require("moment"), require("PropTypes"), require("React"), require("ReactDOM"), require("ReactDraggable"), require("ReactRedux"), require("Recharts"));
	else if(typeof define === 'function' && define.amd)
		define(["fontawesome-svg-core", "free-brands-svg-icons", "free-solid-svg-icons", "MaterialUI", "moment", "PropTypes", "React", "ReactDOM", "ReactDraggable", "ReactRedux", "Recharts"], factory);
	else {
		var a = typeof exports === 'object' ? factory(require("fontawesome-svg-core"), require("free-brands-svg-icons"), require("free-solid-svg-icons"), require("MaterialUI"), require("moment"), require("PropTypes"), require("React"), require("ReactDOM"), require("ReactDraggable"), require("ReactRedux"), require("Recharts")) : factory(root["fontawesome-svg-core"], root["free-brands-svg-icons"], root["free-solid-svg-icons"], root["MaterialUI"], root["moment"], root["PropTypes"], root["React"], root["ReactDOM"], root["ReactDraggable"], root["ReactRedux"], root["Recharts"]);
		for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
	}
})(window, function(__WEBPACK_EXTERNAL_MODULE__fortawesome_fontawesome_svg_core__, __WEBPACK_EXTERNAL_MODULE__fortawesome_free_brands_svg_icons__, __WEBPACK_EXTERNAL_MODULE__fortawesome_free_solid_svg_icons__, __WEBPACK_EXTERNAL_MODULE__material_ui_core__, __WEBPACK_EXTERNAL_MODULE_moment__, __WEBPACK_EXTERNAL_MODULE_prop_types__, __WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom__, __WEBPACK_EXTERNAL_MODULE_react_draggable__, __WEBPACK_EXTERNAL_MODULE_react_redux__, __WEBPACK_EXTERNAL_MODULE_recharts__) {
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 = "";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = "./ts/index.tsx");
/******/ })
/************************************************************************/
/******/ ({

/***/ "./node_modules/@fortawesome/react-fontawesome/index.es.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@fortawesome/react-fontawesome/index.es.js ***!
  \*****************************************************************/
/*! exports provided: FontAwesomeIcon */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FontAwesomeIcon", function() { return FontAwesomeIcon; });
/* harmony import */ var _fortawesome_fontawesome_svg_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @fortawesome/fontawesome-svg-core */ "@fortawesome/fontawesome-svg-core");
/* harmony import */ var _fortawesome_fontawesome_svg_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_fortawesome_fontawesome_svg_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);




function _typeof(obj) {
  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
    _typeof = function (obj) {
      return typeof obj;
    };
  } else {
    _typeof = function (obj) {
      return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
    };
  }

  return _typeof(obj);
}

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 _objectSpread(target) {
  for (var i = 1; i < arguments.length; i++) {
    var source = arguments[i] != null ? arguments[i] : {};
    var ownKeys = Object.keys(source);

    if (typeof Object.getOwnPropertySymbols === 'function') {
      ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
        return Object.getOwnPropertyDescriptor(source, sym).enumerable;
      }));
    }

    ownKeys.forEach(function (key) {
      _defineProperty(target, key, source[key]);
    });
  }

  return target;
}

function _objectWithoutPropertiesLoose(source, excluded) {
  if (source == null) return {};
  var target = {};
  var sourceKeys = Object.keys(source);
  var key, i;

  for (i = 0; i < sourceKeys.length; i++) {
    key = sourceKeys[i];
    if (excluded.indexOf(key) >= 0) continue;
    target[key] = source[key];
  }

  return target;
}

function _objectWithoutProperties(source, excluded) {
  if (source == null) return {};

  var target = _objectWithoutPropertiesLoose(source, excluded);

  var key, i;

  if (Object.getOwnPropertySymbols) {
    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);

    for (i = 0; i < sourceSymbolKeys.length; i++) {
      key = sourceSymbolKeys[i];
      if (excluded.indexOf(key) >= 0) continue;
      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
      target[key] = source[key];
    }
  }

  return target;
}

function _toConsumableArray(arr) {
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
}

function _arrayWithoutHoles(arr) {
  if (Array.isArray(arr)) {
    for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];

    return arr2;
  }
}

function _iterableToArray(iter) {
  if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
}

function _nonIterableSpread() {
  throw new TypeError("Invalid attempt to spread non-iterable instance");
}

var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};

function createCommonjsModule(fn, module) {
	return module = { exports: {} }, fn(module, module.exports), module.exports;
}

var humps = createCommonjsModule(function (module) {
(function(global) {

  var _processKeys = function(convert, obj, options) {
    if(!_isObject(obj) || _isDate(obj) || _isRegExp(obj) || _isBoolean(obj) || _isFunction(obj)) {
      return obj;
    }

    var output,
        i = 0,
        l = 0;

    if(_isArray(obj)) {
      output = [];
      for(l=obj.length; i<l; i++) {
        output.push(_processKeys(convert, obj[i], options));
      }
    }
    else {
      output = {};
      for(var key in obj) {
        if(Object.prototype.hasOwnProperty.call(obj, key)) {
          output[convert(key, options)] = _processKeys(convert, obj[key], options);
        }
      }
    }
    return output;
  };

  // String conversion methods

  var separateWords = function(string, options) {
    options = options || {};
    var separator = options.separator || '_';
    var split = options.split || /(?=[A-Z])/;

    return string.split(split).join(separator);
  };

  var camelize = function(string) {
    if (_isNumerical(string)) {
      return string;
    }
    string = string.replace(/[\-_\s]+(.)?/g, function(match, chr) {
      return chr ? chr.toUpperCase() : '';
    });
    // Ensure 1st char is always lowercase
    return string.substr(0, 1).toLowerCase() + string.substr(1);
  };

  var pascalize = function(string) {
    var camelized = camelize(string);
    // Ensure 1st char is always uppercase
    return camelized.substr(0, 1).toUpperCase() + camelized.substr(1);
  };

  var decamelize = function(string, options) {
    return separateWords(string, options).toLowerCase();
  };

  // Utilities
  // Taken from Underscore.js

  var toString = Object.prototype.toString;

  var _isFunction = function(obj) {
    return typeof(obj) === 'function';
  };
  var _isObject = function(obj) {
    return obj === Object(obj);
  };
  var _isArray = function(obj) {
    return toString.call(obj) == '[object Array]';
  };
  var _isDate = function(obj) {
    return toString.call(obj) == '[object Date]';
  };
  var _isRegExp = function(obj) {
    return toString.call(obj) == '[object RegExp]';
  };
  var _isBoolean = function(obj) {
    return toString.call(obj) == '[object Boolean]';
  };

  // Performant way to determine if obj coerces to a number
  var _isNumerical = function(obj) {
    obj = obj - 0;
    return obj === obj;
  };

  // Sets up function which handles processing keys
  // allowing the convert function to be modified by a callback
  var _processor = function(convert, options) {
    var callback = options && 'process' in options ? options.process : options;

    if(typeof(callback) !== 'function') {
      return convert;
    }

    return function(string, options) {
      return callback(string, convert, options);
    }
  };

  var humps = {
    camelize: camelize,
    decamelize: decamelize,
    pascalize: pascalize,
    depascalize: decamelize,
    camelizeKeys: function(object, options) {
      return _processKeys(_processor(camelize, options), object);
    },
    decamelizeKeys: function(object, options) {
      return _processKeys(_processor(decamelize, options), object, options);
    },
    pascalizeKeys: function(object, options) {
      return _processKeys(_processor(pascalize, options), object);
    },
    depascalizeKeys: function () {
      return this.decamelizeKeys.apply(this, arguments);
    }
  };

  if (module.exports) {
    module.exports = humps;
  } else {
    global.humps = humps;
  }

})(commonjsGlobal);
});

function capitalize(val) {
  return val.charAt(0).toUpperCase() + val.slice(1);
}

function styleToObject(style) {
  return style.split(';').map(function (s) {
    return s.trim();
  }).filter(function (s) {
    return s;
  }).reduce(function (acc, pair) {
    var i = pair.indexOf(':');
    var prop = humps.camelize(pair.slice(0, i));
    var value = pair.slice(i + 1).trim();
    prop.startsWith('webkit') ? acc[capitalize(prop)] = value : acc[prop] = value;
    return acc;
  }, {});
}

function convert(createElement, element) {
  var extraProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

  if (typeof element === 'string') {
    return element;
  }

  var children = (element.children || []).map(function (child) {
    return convert(createElement, child);
  });
  var mixins = Object.keys(element.attributes || {}).reduce(function (acc, key) {
    var val = element.attributes[key];

    switch (key) {
      case 'class':
        acc.attrs['className'] = val;
        delete element.attributes['class'];
        break;

      case 'style':
        acc.attrs['style'] = styleToObject(val);
        break;

      default:
        if (key.indexOf('aria-') === 0 || key.indexOf('data-') === 0) {
          acc.attrs[key.toLowerCase()] = val;
        } else {
          acc.attrs[humps.camelize(key)] = val;
        }

    }

    return acc;
  }, {
    attrs: {}
  });

  var _extraProps$style = extraProps.style,
      existingStyle = _extraProps$style === void 0 ? {} : _extraProps$style,
      remaining = _objectWithoutProperties(extraProps, ["style"]);

  mixins.attrs['style'] = _objectSpread({}, mixins.attrs['style'], existingStyle);
  return createElement.apply(void 0, [element.tag, _objectSpread({}, mixins.attrs, remaining)].concat(_toConsumableArray(children)));
}

var PRODUCTION = false;

try {
  PRODUCTION = "development" === 'production';
} catch (e) {}

function log () {
  if (!PRODUCTION && console && typeof console.error === 'function') {
    var _console;

    (_console = console).error.apply(_console, arguments);
  }
}

function objectWithKey(key, value) {
  return Array.isArray(value) && value.length > 0 || !Array.isArray(value) && value ? _defineProperty({}, key, value) : {};
}

function classList(props) {
  var _classes;

  var classes = (_classes = {
    'fa-spin': props.spin,
    'fa-pulse': props.pulse,
    'fa-fw': props.fixedWidth,
    'fa-inverse': props.inverse,
    'fa-border': props.border,
    'fa-li': props.listItem,
    'fa-flip-horizontal': props.flip === 'horizontal' || props.flip === 'both',
    'fa-flip-vertical': props.flip === 'vertical' || props.flip === 'both'
  }, _defineProperty(_classes, "fa-".concat(props.size), props.size !== null), _defineProperty(_classes, "fa-rotate-".concat(props.rotation), props.rotation !== null), _defineProperty(_classes, "fa-pull-".concat(props.pull), props.pull !== null), _classes);
  return Object.keys(classes).map(function (key) {
    return classes[key] ? key : null;
  }).filter(function (key) {
    return key;
  });
}

function normalizeIconArgs(icon$$1) {
  if (icon$$1 === null) {
    return null;
  }

  if (_typeof(icon$$1) === 'object' && icon$$1.prefix && icon$$1.iconName) {
    return icon$$1;
  }

  if (Array.isArray(icon$$1) && icon$$1.length === 2) {
    return {
      prefix: icon$$1[0],
      iconName: icon$$1[1]
    };
  }

  if (typeof icon$$1 === 'string') {
    return {
      prefix: 'fas',
      iconName: icon$$1
    };
  }
}

function FontAwesomeIcon(props) {
  var iconArgs = props.icon,
      maskArgs = props.mask,
      symbol = props.symbol,
      className = props.className,
      title = props.title;
  var iconLookup = normalizeIconArgs(iconArgs);
  var classes = objectWithKey('classes', [].concat(_toConsumableArray(classList(props)), _toConsumableArray(className.split(' '))));
  var transform = objectWithKey('transform', typeof props.transform === 'string' ? _fortawesome_fontawesome_svg_core__WEBPACK_IMPORTED_MODULE_0__["parse"].transform(props.transform) : props.transform);
  var mask = objectWithKey('mask', normalizeIconArgs(maskArgs));
  var renderedIcon = Object(_fortawesome_fontawesome_svg_core__WEBPACK_IMPORTED_MODULE_0__["icon"])(iconLookup, _objectSpread({}, classes, transform, mask, {
    symbol: symbol,
    title: title
  }));

  if (!renderedIcon) {
    log('Could not find icon', iconLookup);
    return null;
  }

  var abstract = renderedIcon.abstract;
  var extraProps = {};
  Object.keys(props).forEach(function (key) {
    if (!FontAwesomeIcon.defaultProps.hasOwnProperty(key)) {
      extraProps[key] = props[key];
    }
  });
  return convertCurry(abstract[0], extraProps);
}
FontAwesomeIcon.displayName = 'FontAwesomeIcon';
FontAwesomeIcon.propTypes = {
  border: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,
  className: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
  mask: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),
  fixedWidth: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,
  inverse: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,
  flip: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['horizontal', 'vertical', 'both']),
  icon: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),
  listItem: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,
  pull: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['right', 'left']),
  pulse: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,
  rotation: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf([90, 180, 270]),
  size: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['lg', 'xs', 'sm', '1x', '2x', '3x', '4x', '5x', '6x', '7x', '8x', '9x', '10x']),
  spin: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,
  symbol: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string]),
  title: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string,
  transform: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object])
};
FontAwesomeIcon.defaultProps = {
  border: false,
  className: '',
  mask: null,
  fixedWidth: false,
  inverse: false,
  flip: null,
  icon: null,
  listItem: false,
  pull: null,
  pulse: false,
  rotation: null,
  size: null,
  spin: false,
  symbol: false,
  title: '',
  transform: null
};
var convertCurry = convert.bind(null, react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement);



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

/***/ }),

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

var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
  Copyright (c) 2017 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/
/* global define */

(function () {
	'use strict';

	var hasOwn = {}.hasOwnProperty;

	function classNames () {
		var classes = [];

		for (var i = 0; i < arguments.length; i++) {
			var arg = arguments[i];
			if (!arg) continue;

			var argType = typeof arg;

			if (argType === 'string' || argType === 'number') {
				classes.push(arg);
			} else if (Array.isArray(arg) && arg.length) {
				var inner = classNames.apply(null, arg);
				if (inner) {
					classes.push(inner);
				}
			} else if (argType === 'object') {
				for (var key in arg) {
					if (hasOwn.call(arg, key) && arg[key]) {
						classes.push(key);
					}
				}
			}
		}

		return classes.join(' ');
	}

	if ( true && module.exports) {
		classNames.default = classNames;
		module.exports = classNames;
	} else if (true) {
		// register as 'classnames', consistent with npm package name
		!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
			return classNames;
		}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
	} else {}
}());


/***/ }),

/***/ "./node_modules/deep-object-diff/dist/added/index.js":
/*!***********************************************************!*\
  !*** ./node_modules/deep-object-diff/dist/added/index.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
  if (true) {
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(/*! ../utils */ "./node_modules/deep-object-diff/dist/utils/index.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else { var mod; }
})(this, function (module, exports, _utils) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  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;
  }

  var _extends = Object.assign || function (target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i];

      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          target[key] = source[key];
        }
      }
    }

    return target;
  };

  var addedDiff = function addedDiff(lhs, rhs) {

    if (lhs === rhs || !(0, _utils.isObject)(lhs) || !(0, _utils.isObject)(rhs)) return {};

    var l = (0, _utils.properObject)(lhs);
    var r = (0, _utils.properObject)(rhs);

    return Object.keys(r).reduce(function (acc, key) {
      if (l.hasOwnProperty(key)) {
        var difference = addedDiff(l[key], r[key]);

        if ((0, _utils.isObject)(difference) && (0, _utils.isEmpty)(difference)) return acc;

        return _extends({}, acc, _defineProperty({}, key, difference));
      }

      return _extends({}, acc, _defineProperty({}, key, r[key]));
    }, {});
  };

  exports.default = addedDiff;
  module.exports = exports['default'];
});

/***/ }),

/***/ "./node_modules/deep-object-diff/dist/deleted/index.js":
/*!*************************************************************!*\
  !*** ./node_modules/deep-object-diff/dist/deleted/index.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
  if (true) {
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(/*! ../utils */ "./node_modules/deep-object-diff/dist/utils/index.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else { var mod; }
})(this, function (module, exports, _utils) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  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;
  }

  var _extends = Object.assign || function (target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i];

      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          target[key] = source[key];
        }
      }
    }

    return target;
  };

  var deletedDiff = function deletedDiff(lhs, rhs) {
    if (lhs === rhs || !(0, _utils.isObject)(lhs) || !(0, _utils.isObject)(rhs)) return {};

    var l = (0, _utils.properObject)(lhs);
    var r = (0, _utils.properObject)(rhs);

    return Object.keys(l).reduce(function (acc, key) {
      if (r.hasOwnProperty(key)) {
        var difference = deletedDiff(l[key], r[key]);

        if ((0, _utils.isObject)(difference) && (0, _utils.isEmpty)(difference)) return acc;

        return _extends({}, acc, _defineProperty({}, key, difference));
      }

      return _extends({}, acc, _defineProperty({}, key, undefined));
    }, {});
  };

  exports.default = deletedDiff;
  module.exports = exports['default'];
});

/***/ }),

/***/ "./node_modules/deep-object-diff/dist/detailed/index.js":
/*!**************************************************************!*\
  !*** ./node_modules/deep-object-diff/dist/detailed/index.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
  if (true) {
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(/*! ../added */ "./node_modules/deep-object-diff/dist/added/index.js"), __webpack_require__(/*! ../deleted */ "./node_modules/deep-object-diff/dist/deleted/index.js"), __webpack_require__(/*! ../updated */ "./node_modules/deep-object-diff/dist/updated/index.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else { var mod; }
})(this, function (module, exports, _added, _deleted, _updated) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  var _added2 = _interopRequireDefault(_added);

  var _deleted2 = _interopRequireDefault(_deleted);

  var _updated2 = _interopRequireDefault(_updated);

  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : {
      default: obj
    };
  }

  var detailedDiff = function detailedDiff(lhs, rhs) {
    return {
      added: (0, _added2.default)(lhs, rhs),
      deleted: (0, _deleted2.default)(lhs, rhs),
      updated: (0, _updated2.default)(lhs, rhs)
    };
  };

  exports.default = detailedDiff;
  module.exports = exports['default'];
});

/***/ }),

/***/ "./node_modules/deep-object-diff/dist/diff/index.js":
/*!**********************************************************!*\
  !*** ./node_modules/deep-object-diff/dist/diff/index.js ***!
  \**********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
  if (true) {
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(/*! ../utils */ "./node_modules/deep-object-diff/dist/utils/index.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else { var mod; }
})(this, function (module, exports, _utils) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  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;
  }

  var _extends = Object.assign || function (target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i];

      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          target[key] = source[key];
        }
      }
    }

    return target;
  };

  var diff = function diff(lhs, rhs) {
    if (lhs === rhs) return {}; // equal return no diff

    if (!(0, _utils.isObject)(lhs) || !(0, _utils.isObject)(rhs)) return rhs; // return updated rhs

    var l = (0, _utils.properObject)(lhs);
    var r = (0, _utils.properObject)(rhs);

    var deletedValues = Object.keys(l).reduce(function (acc, key) {
      return r.hasOwnProperty(key) ? acc : _extends({}, acc, _defineProperty({}, key, undefined));
    }, {});

    if ((0, _utils.isDate)(l) || (0, _utils.isDate)(r)) {
      if (l.valueOf() == r.valueOf()) return {};
      return r;
    }

    return Object.keys(r).reduce(function (acc, key) {
      if (!l.hasOwnProperty(key)) return _extends({}, acc, _defineProperty({}, key, r[key])); // return added r key

      var difference = diff(l[key], r[key]);

      if ((0, _utils.isObject)(difference) && (0, _utils.isEmpty)(difference) && !(0, _utils.isDate)(difference)) return acc; // return no diff

      return _extends({}, acc, _defineProperty({}, key, difference)); // return updated key
    }, deletedValues);
  };

  exports.default = diff;
  module.exports = exports['default'];
});

/***/ }),

/***/ "./node_modules/deep-object-diff/dist/index.js":
/*!*****************************************************!*\
  !*** ./node_modules/deep-object-diff/dist/index.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
  if (true) {
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! ./diff */ "./node_modules/deep-object-diff/dist/diff/index.js"), __webpack_require__(/*! ./added */ "./node_modules/deep-object-diff/dist/added/index.js"), __webpack_require__(/*! ./deleted */ "./node_modules/deep-object-diff/dist/deleted/index.js"), __webpack_require__(/*! ./updated */ "./node_modules/deep-object-diff/dist/updated/index.js"), __webpack_require__(/*! ./detailed */ "./node_modules/deep-object-diff/dist/detailed/index.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else { var mod; }
})(this, function (exports, _diff, _added, _deleted, _updated, _detailed) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.detailedDiff = exports.updatedDiff = exports.deletedDiff = exports.diff = exports.addedDiff = undefined;

  var _diff2 = _interopRequireDefault(_diff);

  var _added2 = _interopRequireDefault(_added);

  var _deleted2 = _interopRequireDefault(_deleted);

  var _updated2 = _interopRequireDefault(_updated);

  var _detailed2 = _interopRequireDefault(_detailed);

  function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : {
      default: obj
    };
  }

  exports.addedDiff = _added2.default;
  exports.diff = _diff2.default;
  exports.deletedDiff = _deleted2.default;
  exports.updatedDiff = _updated2.default;
  exports.detailedDiff = _detailed2.default;
});

/***/ }),

/***/ "./node_modules/deep-object-diff/dist/updated/index.js":
/*!*************************************************************!*\
  !*** ./node_modules/deep-object-diff/dist/updated/index.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
  if (true) {
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(/*! ../utils */ "./node_modules/deep-object-diff/dist/utils/index.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else { var mod; }
})(this, function (module, exports, _utils) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  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;
  }

  var _extends = Object.assign || function (target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i];

      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          target[key] = source[key];
        }
      }
    }

    return target;
  };

  var updatedDiff = function updatedDiff(lhs, rhs) {

    if (lhs === rhs) return {};

    if (!(0, _utils.isObject)(lhs) || !(0, _utils.isObject)(rhs)) return rhs;

    var l = (0, _utils.properObject)(lhs);
    var r = (0, _utils.properObject)(rhs);

    if ((0, _utils.isDate)(l) || (0, _utils.isDate)(r)) {
      if (l.valueOf() == r.valueOf()) return {};
      return r;
    }

    return Object.keys(r).reduce(function (acc, key) {

      if (l.hasOwnProperty(key)) {
        var difference = updatedDiff(l[key], r[key]);

        if ((0, _utils.isObject)(difference) && (0, _utils.isEmpty)(difference) && !(0, _utils.isDate)(difference)) return acc;

        return _extends({}, acc, _defineProperty({}, key, difference));
      }

      return acc;
    }, {});
  };

  exports.default = updatedDiff;
  module.exports = exports['default'];
});

/***/ }),

/***/ "./node_modules/deep-object-diff/dist/utils/index.js":
/*!***********************************************************!*\
  !*** ./node_modules/deep-object-diff/dist/utils/index.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
  if (true) {
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else { var mod; }
})(this, function (exports) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  var _extends = Object.assign || function (target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i];

      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          target[key] = source[key];
        }
      }
    }

    return target;
  };

  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
    return typeof obj;
  } : function (obj) {
    return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  };

  var isDate = exports.isDate = function isDate(d) {
    return d instanceof Date;
  };
  var isEmpty = exports.isEmpty = function isEmpty(o) {
    return Object.keys(o).length === 0;
  };
  var isObject = exports.isObject = function isObject(o) {
    return o != null && (typeof o === 'undefined' ? 'undefined' : _typeof(o)) === 'object';
  };
  var properObject = exports.properObject = function properObject(o) {
    return isObject(o) && !o.hasOwnProperty ? _extends({}, o) : o;
  };
});

/***/ }),

/***/ "./node_modules/fast-memoize/src/index.js":
/*!************************************************!*\
  !*** ./node_modules/fast-memoize/src/index.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

//
// Main
//

function memoize (fn, options) {
  var cache = options && options.cache
    ? options.cache
    : cacheDefault

  var serializer = options && options.serializer
    ? options.serializer
    : serializerDefault

  var strategy = options && options.strategy
    ? options.strategy
    : strategyDefault

  return strategy(fn, {
    cache: cache,
    serializer: serializer
  })
}

//
// Strategy
//

function isPrimitive (value) {
  return value == null || typeof value === 'number' || typeof value === 'boolean' // || typeof value === "string" 'unsafe' primitive for our needs
}

function monadic (fn, cache, serializer, arg) {
  var cacheKey = isPrimitive(arg) ? arg : serializer(arg)

  var computedValue = cache.get(cacheKey)
  if (typeof computedValue === 'undefined') {
    computedValue = fn.call(this, arg)
    cache.set(cacheKey, computedValue)
  }

  return computedValue
}

function variadic (fn, cache, serializer) {
  var args = Array.prototype.slice.call(arguments, 3)
  var cacheKey = serializer(args)

  var computedValue = cache.get(cacheKey)
  if (typeof computedValue === 'undefined') {
    computedValue = fn.apply(this, args)
    cache.set(cacheKey, computedValue)
  }

  return computedValue
}

function assemble (fn, context, strategy, cache, serialize) {
  return strategy.bind(
    context,
    fn,
    cache,
    serialize
  )
}

function strategyDefault (fn, options) {
  var strategy = fn.length === 1 ? monadic : variadic

  return assemble(
    fn,
    this,
    strategy,
    options.cache.create(),
    options.serializer
  )
}

function strategyVariadic (fn, options) {
  var strategy = variadic

  return assemble(
    fn,
    this,
    strategy,
    options.cache.create(),
    options.serializer
  )
}

function strategyMonadic (fn, options) {
  var strategy = monadic

  return assemble(
    fn,
    this,
    strategy,
    options.cache.create(),
    options.serializer
  )
}

//
// Serializer
//

function serializerDefault () {
  return JSON.stringify(arguments)
}

//
// Cache
//

function ObjectWithoutPrototypeCache () {
  this.cache = Object.create(null)
}

ObjectWithoutPrototypeCache.prototype.has = function (key) {
  return (key in this.cache)
}

ObjectWithoutPrototypeCache.prototype.get = function (key) {
  return this.cache[key]
}

ObjectWithoutPrototypeCache.prototype.set = function (key, value) {
  this.cache[key] = value
}

var cacheDefault = {
  create: function create () {
    return new ObjectWithoutPrototypeCache()
  }
}

//
// API
//

module.exports = memoize
module.exports.strategies = {
  variadic: strategyVariadic,
  monadic: strategyMonadic
}


/***/ }),

/***/ "./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js ***!
  \**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


/**
 * Copyright 2015, Yahoo! Inc.
 * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
 */
var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
var REACT_STATICS = {
    childContextTypes: true,
    contextType: true,
    contextTypes: true,
    defaultProps: true,
    displayName: true,
    getDefaultProps: true,
    getDerivedStateFromError: true,
    getDerivedStateFromProps: true,
    mixins: true,
    propTypes: true,
    type: true
};

var KNOWN_STATICS = {
    name: true,
    length: true,
    prototype: true,
    caller: true,
    callee: true,
    arguments: true,
    arity: true
};

var FORWARD_REF_STATICS = {
    '$$typeof': true,
    render: true,
    defaultProps: true,
    displayName: true,
    propTypes: true
};

var MEMO_STATICS = {
    '$$typeof': true,
    compare: true,
    defaultProps: true,
    displayName: true,
    propTypes: true,
    type: true
};

var TYPE_STATICS = {};
TYPE_STATICS[ReactIs.ForwardRef] = FORWARD_REF_STATICS;

function getStatics(component) {
    if (ReactIs.isMemo(component)) {
        return MEMO_STATICS;
    }
    return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
}

var defineProperty = Object.defineProperty;
var getOwnPropertyNames = Object.getOwnPropertyNames;
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var getPrototypeOf = Object.getPrototypeOf;
var objectPrototype = Object.prototype;

function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
    if (typeof sourceComponent !== 'string') {
        // don't hoist over string (html) components

        if (objectPrototype) {
            var inheritedComponent = getPrototypeOf(sourceComponent);
            if (inheritedComponent && inheritedComponent !== objectPrototype) {
                hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
            }
        }

        var keys = getOwnPropertyNames(sourceComponent);

        if (getOwnPropertySymbols) {
            keys = keys.concat(getOwnPropertySymbols(sourceComponent));
        }

        var targetStatics = getStatics(targetComponent);
        var sourceStatics = getStatics(sourceComponent);

        for (var i = 0; i < keys.length; ++i) {
            var key = keys[i];
            if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
                var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
                try {
                    // Avoid failures from read-only properties
                    defineProperty(targetComponent, key, descriptor);
                } catch (e) {}
            }
        }

        return targetComponent;
    }

    return targetComponent;
}

module.exports = hoistNonReactStatics;


/***/ }),

/***/ "./node_modules/intl-format-cache/lib/index.js":
/*!*****************************************************!*\
  !*** ./node_modules/intl-format-cache/lib/index.js ***!
  \*****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/*
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
Copyrights licensed under the New BSD License.
See the accompanying LICENSE file for terms.
*/
// -- Utilities ----------------------------------------------------------------
function getCacheId(inputs) {
    return JSON.stringify(inputs.map(function (input) {
        return input && typeof input === 'object' ? orderedProps(input) : input;
    }));
}
function orderedProps(obj) {
    return Object.keys(obj)
        .sort()
        .map(function (k) {
        var _a;
        return (_a = {}, _a[k] = obj[k], _a);
    });
}
var memoizeFormatConstructor = function (FormatConstructor, cache) {
    if (cache === void 0) { cache = {}; }
    return function () {
        var _a;
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        var cacheId = getCacheId(args);
        var format = cacheId && cache[cacheId];
        if (!format) {
            format = new ((_a = FormatConstructor).bind.apply(_a, [void 0].concat(args)))();
            if (cacheId) {
                cache[cacheId] = format;
            }
        }
        return format;
    };
};
/* harmony default export */ __webpack_exports__["default"] = (memoizeFormatConstructor);


/***/ }),

/***/ "./node_modules/intl-locales-supported/lib/index.js":
/*!**********************************************************!*\
  !*** ./node_modules/intl-locales-supported/lib/index.js ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return areIntlLocalesSupported; });
/*
 * Copyright 2015, Yahoo Inc.
 * Copyrights licensed under the New BSD License.
 * See the accompanying LICENSE file for terms.
 */
function areIntlLocalesSupported(locales, constructorsToCheck) {
    if (typeof Intl === 'undefined') {
        return false;
    }
    if (!locales) {
        throw new Error('locales must be supplied.');
    }
    if (!Array.isArray(locales)) {
        locales = [locales];
    }
    // Per https://github.com/formatjs/formatjs/issues/151
    if (!constructorsToCheck) {
        constructorsToCheck = [
            Intl.DateTimeFormat,
            Intl.NumberFormat,
            Intl.PluralRules,
        ];
    }
    var intlConstructors = constructorsToCheck.filter(Boolean);
    if (intlConstructors.length === 0) {
        return false;
    }
    return intlConstructors.every(function (intlConstructor) {
        return intlConstructor.supportedLocalesOf(locales).length === locales.length;
    });
}


/***/ }),

/***/ "./node_modules/intl-messageformat-parser/lib/index.js":
/*!*************************************************************!*\
  !*** ./node_modules/intl-messageformat-parser/lib/index.js ***!
  \*************************************************************/
/*! exports provided: TYPE, isLiteralElement, isArgumentElement, isNumberElement, isDateElement, isTimeElement, isSelectElement, isPluralElement, isNumberSkeleton, isDateTimeSkeleton, createLiteralElement, createNumberElement, SyntaxError, parse */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parse", function() { return parse; });
/* harmony import */ var _parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./parser */ "./node_modules/intl-messageformat-parser/lib/parser.js");
/* harmony import */ var _normalize__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./normalize */ "./node_modules/intl-messageformat-parser/lib/normalize.js");
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./types */ "./node_modules/intl-messageformat-parser/lib/types.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TYPE", function() { return _types__WEBPACK_IMPORTED_MODULE_2__["TYPE"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isLiteralElement", function() { return _types__WEBPACK_IMPORTED_MODULE_2__["isLiteralElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isArgumentElement", function() { return _types__WEBPACK_IMPORTED_MODULE_2__["isArgumentElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isNumberElement", function() { return _types__WEBPACK_IMPORTED_MODULE_2__["isNumberElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isDateElement", function() { return _types__WEBPACK_IMPORTED_MODULE_2__["isDateElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isTimeElement", function() { return _types__WEBPACK_IMPORTED_MODULE_2__["isTimeElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isSelectElement", function() { return _types__WEBPACK_IMPORTED_MODULE_2__["isSelectElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isPluralElement", function() { return _types__WEBPACK_IMPORTED_MODULE_2__["isPluralElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isNumberSkeleton", function() { return _types__WEBPACK_IMPORTED_MODULE_2__["isNumberSkeleton"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isDateTimeSkeleton", function() { return _types__WEBPACK_IMPORTED_MODULE_2__["isDateTimeSkeleton"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createLiteralElement", function() { return _types__WEBPACK_IMPORTED_MODULE_2__["createLiteralElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createNumberElement", function() { return _types__WEBPACK_IMPORTED_MODULE_2__["createNumberElement"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SyntaxError", function() { return _parser__WEBPACK_IMPORTED_MODULE_0__["SyntaxError"]; });





function parse(input, opts) {
    var els = Object(_parser__WEBPACK_IMPORTED_MODULE_0__["parse"])(input, opts);
    if (!opts || opts.normalizeHashtagInPlural !== false) {
        Object(_normalize__WEBPACK_IMPORTED_MODULE_1__["normalizeHashtagInPlural"])(els);
    }
    return els;
}


/***/ }),

/***/ "./node_modules/intl-messageformat-parser/lib/normalize.js":
/*!*****************************************************************!*\
  !*** ./node_modules/intl-messageformat-parser/lib/normalize.js ***!
  \*****************************************************************/
/*! exports provided: normalizeHashtagInPlural */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalizeHashtagInPlural", function() { return normalizeHashtagInPlural; });
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./types */ "./node_modules/intl-messageformat-parser/lib/types.js");
/* harmony import */ var _parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parser */ "./node_modules/intl-messageformat-parser/lib/parser.js");


var PLURAL_HASHTAG_REGEX = /(^|[^\\])#/g;
/**
 * Whether to convert `#` in plural rule options
 * to `{var, number}`
 * @param el AST Element
 * @param pluralStack current plural stack
 */
function normalizeHashtagInPlural(els) {
    els.forEach(function (el) {
        // If we're encountering a plural el
        if (!Object(_types__WEBPACK_IMPORTED_MODULE_0__["isPluralElement"])(el) && !Object(_types__WEBPACK_IMPORTED_MODULE_0__["isSelectElement"])(el)) {
            return;
        }
        // Go down the options and search for # in any literal element
        Object.keys(el.options).forEach(function (id) {
            var _a;
            var opt = el.options[id];
            // If we got a match, we have to split this
            // and inject a NumberElement in the middle
            var matchingLiteralElIndex = -1;
            var literalEl = undefined;
            for (var i = 0; i < opt.value.length; i++) {
                var el_1 = opt.value[i];
                if (Object(_types__WEBPACK_IMPORTED_MODULE_0__["isLiteralElement"])(el_1) && PLURAL_HASHTAG_REGEX.test(el_1.value)) {
                    matchingLiteralElIndex = i;
                    literalEl = el_1;
                    break;
                }
            }
            if (literalEl) {
                var newValue = literalEl.value.replace(PLURAL_HASHTAG_REGEX, "$1{" + el.value + ", number}");
                var newEls = Object(_parser__WEBPACK_IMPORTED_MODULE_1__["parse"])(newValue);
                (_a = opt.value).splice.apply(_a, [matchingLiteralElIndex, 1].concat(newEls));
            }
            normalizeHashtagInPlural(opt.value);
        });
    });
}


/***/ }),

/***/ "./node_modules/intl-messageformat-parser/lib/parser.js":
/*!**************************************************************!*\
  !*** ./node_modules/intl-messageformat-parser/lib/parser.js ***!
  \**************************************************************/
/*! exports provided: SyntaxError, parse */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SyntaxError", function() { return SyntaxError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parse", function() { return parse; });
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./types */ "./node_modules/intl-messageformat-parser/lib/types.js");
// tslint:disable:only-arrow-functions
// tslint:disable:object-literal-shorthand
// tslint:disable:trailing-comma
// tslint:disable:object-literal-sort-keys
// tslint:disable:one-variable-per-declaration
// tslint:disable:max-line-length
// tslint:disable:no-consecutive-blank-lines
// tslint:disable:align
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (undefined && undefined.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
// Generated by PEG.js v. 0.10.0 (ts-pegjs plugin v. 0.2.6 )
//
// https://pegjs.org/   https://github.com/metadevpro/ts-pegjs

var SyntaxError = /** @class */ (function (_super) {
    __extends(SyntaxError, _super);
    function SyntaxError(message, expected, found, location) {
        var _this = _super.call(this) || this;
        _this.message = message;
        _this.expected = expected;
        _this.found = found;
        _this.location = location;
        _this.name = "SyntaxError";
        if (typeof Error.captureStackTrace === "function") {
            Error.captureStackTrace(_this, SyntaxError);
        }
        return _this;
    }
    SyntaxError.buildMessage = function (expected, found) {
        function hex(ch) {
            return ch.charCodeAt(0).toString(16).toUpperCase();
        }
        function literalEscape(s) {
            return s
                .replace(/\\/g, "\\\\")
                .replace(/"/g, "\\\"")
                .replace(/\0/g, "\\0")
                .replace(/\t/g, "\\t")
                .replace(/\n/g, "\\n")
                .replace(/\r/g, "\\r")
                .replace(/[\x00-\x0F]/g, function (ch) { return "\\x0" + hex(ch); })
                .replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) { return "\\x" + hex(ch); });
        }
        function classEscape(s) {
            return s
                .replace(/\\/g, "\\\\")
                .replace(/\]/g, "\\]")
                .replace(/\^/g, "\\^")
                .replace(/-/g, "\\-")
                .replace(/\0/g, "\\0")
                .replace(/\t/g, "\\t")
                .replace(/\n/g, "\\n")
                .replace(/\r/g, "\\r")
                .replace(/[\x00-\x0F]/g, function (ch) { return "\\x0" + hex(ch); })
                .replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) { return "\\x" + hex(ch); });
        }
        function describeExpectation(expectation) {
            switch (expectation.type) {
                case "literal":
                    return "\"" + literalEscape(expectation.text) + "\"";
                case "class":
                    var escapedParts = expectation.parts.map(function (part) {
                        return Array.isArray(part)
                            ? classEscape(part[0]) + "-" + classEscape(part[1])
                            : classEscape(part);
                    });
                    return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]";
                case "any":
                    return "any character";
                case "end":
                    return "end of input";
                case "other":
                    return expectation.description;
            }
        }
        function describeExpected(expected1) {
            var descriptions = expected1.map(describeExpectation);
            var i;
            var j;
            descriptions.sort();
            if (descriptions.length > 0) {
                for (i = 1, j = 1; i < descriptions.length; i++) {
                    if (descriptions[i - 1] !== descriptions[i]) {
                        descriptions[j] = descriptions[i];
                        j++;
                    }
                }
                descriptions.length = j;
            }
            switch (descriptions.length) {
                case 1:
                    return descriptions[0];
                case 2:
                    return descriptions[0] + " or " + descriptions[1];
                default:
                    return descriptions.slice(0, -1).join(", ")
                        + ", or "
                        + descriptions[descriptions.length - 1];
            }
        }
        function describeFound(found1) {
            return found1 ? "\"" + literalEscape(found1) + "\"" : "end of input";
        }
        return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
    };
    return SyntaxError;
}(Error));

function peg$parse(input, options) {
    options = options !== undefined ? options : {};
    var peg$FAILED = {};
    var peg$startRuleFunctions = { start: peg$parsestart };
    var peg$startRuleFunction = peg$parsestart;
    var peg$c0 = function (parts) {
        return parts.join('');
    };
    var peg$c1 = function (messageText) {
        return __assign({ type: _types__WEBPACK_IMPORTED_MODULE_0__["TYPE"].literal, value: messageText }, insertLocation());
    };
    var peg$c2 = peg$otherExpectation("argumentElement");
    var peg$c3 = "{";
    var peg$c4 = peg$literalExpectation("{", false);
    var peg$c5 = "}";
    var peg$c6 = peg$literalExpectation("}", false);
    var peg$c7 = function (value) {
        return __assign({ type: _types__WEBPACK_IMPORTED_MODULE_0__["TYPE"].argument, value: value }, insertLocation());
    };
    var peg$c8 = peg$otherExpectation("numberSkeletonId");
    var peg$c9 = /^['\/{}]/;
    var peg$c10 = peg$classExpectation(["'", "/", "{", "}"], false, false);
    var peg$c11 = peg$anyExpectation();
    var peg$c12 = peg$otherExpectation("numberSkeletonTokenOption");
    var peg$c13 = "/";
    var peg$c14 = peg$literalExpectation("/", false);
    var peg$c15 = function (option) { return option; };
    var peg$c16 = peg$otherExpectation("numberSkeletonToken");
    var peg$c17 = function (stem, options) {
        return { stem: stem, options: options };
    };
    var peg$c18 = function (tokens) {
        return __assign({ type: 0 /* number */, tokens: tokens }, insertLocation());
    };
    var peg$c19 = "::";
    var peg$c20 = peg$literalExpectation("::", false);
    var peg$c21 = function (skeleton) { return skeleton; };
    var peg$c22 = function (style) { return style.replace(/\s*$/, ''); };
    var peg$c23 = ",";
    var peg$c24 = peg$literalExpectation(",", false);
    var peg$c25 = "number";
    var peg$c26 = peg$literalExpectation("number", false);
    var peg$c27 = function (value, type, style) {
        return __assign({ type: type === 'number' ? _types__WEBPACK_IMPORTED_MODULE_0__["TYPE"].number : type === 'date' ? _types__WEBPACK_IMPORTED_MODULE_0__["TYPE"].date : _types__WEBPACK_IMPORTED_MODULE_0__["TYPE"].time, style: style && style[2], value: value }, insertLocation());
    };
    var peg$c28 = "'";
    var peg$c29 = peg$literalExpectation("'", false);
    var peg$c30 = /^[^']/;
    var peg$c31 = peg$classExpectation(["'"], true, false);
    var peg$c32 = /^[^a-zA-Z'{}]/;
    var peg$c33 = peg$classExpectation([["a", "z"], ["A", "Z"], "'", "{", "}"], true, false);
    var peg$c34 = /^[a-zA-Z]/;
    var peg$c35 = peg$classExpectation([["a", "z"], ["A", "Z"]], false, false);
    var peg$c36 = function (pattern) {
        return __assign({ type: 1 /* dateTime */, pattern: pattern }, insertLocation());
    };
    var peg$c37 = "date";
    var peg$c38 = peg$literalExpectation("date", false);
    var peg$c39 = "time";
    var peg$c40 = peg$literalExpectation("time", false);
    var peg$c41 = "plural";
    var peg$c42 = peg$literalExpectation("plural", false);
    var peg$c43 = "selectordinal";
    var peg$c44 = peg$literalExpectation("selectordinal", false);
    var peg$c45 = "offset:";
    var peg$c46 = peg$literalExpectation("offset:", false);
    var peg$c47 = function (value, pluralType, offset, options) {
        return __assign({ type: _types__WEBPACK_IMPORTED_MODULE_0__["TYPE"].plural, pluralType: pluralType === 'plural' ? 'cardinal' : 'ordinal', value: value, offset: offset ? offset[2] : 0, options: options.reduce(function (all, _a) {
                var id = _a.id, value = _a.value, location = _a.location;
                all[id] = {
                    value: value,
                    location: location
                };
                return all;
            }, {}) }, insertLocation());
    };
    var peg$c48 = "select";
    var peg$c49 = peg$literalExpectation("select", false);
    var peg$c50 = function (value, options) {
        return __assign({ type: _types__WEBPACK_IMPORTED_MODULE_0__["TYPE"].select, value: value, options: options.reduce(function (all, _a) {
                var id = _a.id, value = _a.value, location = _a.location;
                all[id] = {
                    value: value,
                    location: location
                };
                return all;
            }, {}) }, insertLocation());
    };
    var peg$c51 = "=";
    var peg$c52 = peg$literalExpectation("=", false);
    var peg$c53 = function (id, value) {
        return __assign({ id: id,
            value: value }, insertLocation());
    };
    var peg$c54 = function (id, value) {
        return __assign({ id: id,
            value: value }, insertLocation());
    };
    var peg$c55 = peg$otherExpectation("whitespace pattern");
    var peg$c56 = /^[\t-\r \x85\u200E\u200F\u2028\u2029]/;
    var peg$c57 = peg$classExpectation([["\t", "\r"], " ", "\x85", "\u200E", "\u200F", "\u2028", "\u2029"], false, false);
    var peg$c58 = peg$otherExpectation("syntax pattern");
    var peg$c59 = /^[!-\/:-@[-\^`{-~\xA1-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u2010-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]/;
    var peg$c60 = peg$classExpectation([["!", "/"], [":", "@"], ["[", "^"], "`", ["{", "~"], ["\xA1", "\xA7"], "\xA9", "\xAB", "\xAC", "\xAE", "\xB0", "\xB1", "\xB6", "\xBB", "\xBF", "\xD7", "\xF7", ["\u2010", "\u2027"], ["\u2030", "\u203E"], ["\u2041", "\u2053"], ["\u2055", "\u205E"], ["\u2190", "\u245F"], ["\u2500", "\u2775"], ["\u2794", "\u2BFF"], ["\u2E00", "\u2E7F"], ["\u3001", "\u3003"], ["\u3008", "\u3020"], "\u3030", "\uFD3E", "\uFD3F", "\uFE45", "\uFE46"], false, false);
    var peg$c61 = peg$otherExpectation("optional whitespace");
    var peg$c62 = peg$otherExpectation("number");
    var peg$c63 = "-";
    var peg$c64 = peg$literalExpectation("-", false);
    var peg$c65 = function (negative, num) {
        return num
            ? negative
                ? -num
                : num
            : 0;
    };
    var peg$c66 = peg$otherExpectation("apostrophe");
    var peg$c67 = peg$otherExpectation("double apostrophes");
    var peg$c68 = "''";
    var peg$c69 = peg$literalExpectation("''", false);
    var peg$c70 = function () { return "'"; };
    var peg$c71 = /^[{}]/;
    var peg$c72 = peg$classExpectation(["{", "}"], false, false);
    var peg$c73 = function (escapedChar, quotedChars) {
        return escapedChar + quotedChars.replace("''", "'");
    };
    var peg$c74 = /^[^{}]/;
    var peg$c75 = peg$classExpectation(["{", "}"], true, false);
    var peg$c76 = peg$otherExpectation("argNameOrNumber");
    var peg$c77 = peg$otherExpectation("argNumber");
    var peg$c78 = "0";
    var peg$c79 = peg$literalExpectation("0", false);
    var peg$c80 = function () { return 0; };
    var peg$c81 = /^[1-9]/;
    var peg$c82 = peg$classExpectation([["1", "9"]], false, false);
    var peg$c83 = /^[0-9]/;
    var peg$c84 = peg$classExpectation([["0", "9"]], false, false);
    var peg$c85 = function (digits) {
        return parseInt(digits.join(''), 10);
    };
    var peg$c86 = peg$otherExpectation("argName");
    var peg$currPos = 0;
    var peg$savedPos = 0;
    var peg$posDetailsCache = [{ line: 1, column: 1 }];
    var peg$maxFailPos = 0;
    var peg$maxFailExpected = [];
    var peg$silentFails = 0;
    var peg$result;
    if (options.startRule !== undefined) {
        if (!(options.startRule in peg$startRuleFunctions)) {
            throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
        }
        peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
    }
    function text() {
        return input.substring(peg$savedPos, peg$currPos);
    }
    function location() {
        return peg$computeLocation(peg$savedPos, peg$currPos);
    }
    function expected(description, location1) {
        location1 = location1 !== undefined
            ? location1
            : peg$computeLocation(peg$savedPos, peg$currPos);
        throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location1);
    }
    function error(message, location1) {
        location1 = location1 !== undefined
            ? location1
            : peg$computeLocation(peg$savedPos, peg$currPos);
        throw peg$buildSimpleError(message, location1);
    }
    function peg$literalExpectation(text1, ignoreCase) {
        return { type: "literal", text: text1, ignoreCase: ignoreCase };
    }
    function peg$classExpectation(parts, inverted, ignoreCase) {
        return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase };
    }
    function peg$anyExpectation() {
        return { type: "any" };
    }
    function peg$endExpectation() {
        return { type: "end" };
    }
    function peg$otherExpectation(description) {
        return { type: "other", description: description };
    }
    function peg$computePosDetails(pos) {
        var details = peg$posDetailsCache[pos];
        var p;
        if (details) {
            return details;
        }
        else {
            p = pos - 1;
            while (!peg$posDetailsCache[p]) {
                p--;
            }
            details = peg$posDetailsCache[p];
            details = {
                line: details.line,
                column: details.column
            };
            while (p < pos) {
                if (input.charCodeAt(p) === 10) {
                    details.line++;
                    details.column = 1;
                }
                else {
                    details.column++;
                }
                p++;
            }
            peg$posDetailsCache[pos] = details;
            return details;
        }
    }
    function peg$computeLocation(startPos, endPos) {
        var startPosDetails = peg$computePosDetails(startPos);
        var endPosDetails = peg$computePosDetails(endPos);
        return {
            start: {
                offset: startPos,
                line: startPosDetails.line,
                column: startPosDetails.column
            },
            end: {
                offset: endPos,
                line: endPosDetails.line,
                column: endPosDetails.column
            }
        };
    }
    function peg$fail(expected1) {
        if (peg$currPos < peg$maxFailPos) {
            return;
        }
        if (peg$currPos > peg$maxFailPos) {
            peg$maxFailPos = peg$currPos;
            peg$maxFailExpected = [];
        }
        peg$maxFailExpected.push(expected1);
    }
    function peg$buildSimpleError(message, location1) {
        return new SyntaxError(message, [], "", location1);
    }
    function peg$buildStructuredError(expected1, found, location1) {
        return new SyntaxError(SyntaxError.buildMessage(expected1, found), expected1, found, location1);
    }
    function peg$parsestart() {
        var s0;
        s0 = peg$parsemessage();
        return s0;
    }
    function peg$parsemessage() {
        var s0, s1;
        s0 = [];
        s1 = peg$parsemessageElement();
        while (s1 !== peg$FAILED) {
            s0.push(s1);
            s1 = peg$parsemessageElement();
        }
        return s0;
    }
    function peg$parsemessageElement() {
        var s0;
        s0 = peg$parseliteralElement();
        if (s0 === peg$FAILED) {
            s0 = peg$parseargumentElement();
            if (s0 === peg$FAILED) {
                s0 = peg$parsesimpleFormatElement();
                if (s0 === peg$FAILED) {
                    s0 = peg$parsepluralElement();
                    if (s0 === peg$FAILED) {
                        s0 = peg$parseselectElement();
                    }
                }
            }
        }
        return s0;
    }
    function peg$parsemessageText() {
        var s0, s1, s2;
        s0 = peg$currPos;
        s1 = [];
        s2 = peg$parsedoubleApostrophes();
        if (s2 === peg$FAILED) {
            s2 = peg$parsequotedString();
            if (s2 === peg$FAILED) {
                s2 = peg$parseunquotedString();
            }
        }
        if (s2 !== peg$FAILED) {
            while (s2 !== peg$FAILED) {
                s1.push(s2);
                s2 = peg$parsedoubleApostrophes();
                if (s2 === peg$FAILED) {
                    s2 = peg$parsequotedString();
                    if (s2 === peg$FAILED) {
                        s2 = peg$parseunquotedString();
                    }
                }
            }
        }
        else {
            s1 = peg$FAILED;
        }
        if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c0(s1);
        }
        s0 = s1;
        return s0;
    }
    function peg$parseliteralElement() {
        var s0, s1;
        s0 = peg$currPos;
        s1 = peg$parsemessageText();
        if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c1(s1);
        }
        s0 = s1;
        return s0;
    }
    function peg$parseargumentElement() {
        var s0, s1, s2, s3, s4, s5;
        peg$silentFails++;
        s0 = peg$currPos;
        if (input.charCodeAt(peg$currPos) === 123) {
            s1 = peg$c3;
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c4);
            }
        }
        if (s1 !== peg$FAILED) {
            s2 = peg$parse_();
            if (s2 !== peg$FAILED) {
                s3 = peg$parseargNameOrNumber();
                if (s3 !== peg$FAILED) {
                    s4 = peg$parse_();
                    if (s4 !== peg$FAILED) {
                        if (input.charCodeAt(peg$currPos) === 125) {
                            s5 = peg$c5;
                            peg$currPos++;
                        }
                        else {
                            s5 = peg$FAILED;
                            if (peg$silentFails === 0) {
                                peg$fail(peg$c6);
                            }
                        }
                        if (s5 !== peg$FAILED) {
                            peg$savedPos = s0;
                            s1 = peg$c7(s3);
                            s0 = s1;
                        }
                        else {
                            peg$currPos = s0;
                            s0 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s0;
                        s0 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        peg$silentFails--;
        if (s0 === peg$FAILED) {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c2);
            }
        }
        return s0;
    }
    function peg$parsenumberSkeletonId() {
        var s0, s1, s2, s3, s4;
        peg$silentFails++;
        s0 = peg$currPos;
        s1 = [];
        s2 = peg$currPos;
        s3 = peg$currPos;
        peg$silentFails++;
        s4 = peg$parsepatternWhiteSpace();
        if (s4 === peg$FAILED) {
            if (peg$c9.test(input.charAt(peg$currPos))) {
                s4 = input.charAt(peg$currPos);
                peg$currPos++;
            }
            else {
                s4 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c10);
                }
            }
        }
        peg$silentFails--;
        if (s4 === peg$FAILED) {
            s3 = undefined;
        }
        else {
            peg$currPos = s3;
            s3 = peg$FAILED;
        }
        if (s3 !== peg$FAILED) {
            if (input.length > peg$currPos) {
                s4 = input.charAt(peg$currPos);
                peg$currPos++;
            }
            else {
                s4 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c11);
                }
            }
            if (s4 !== peg$FAILED) {
                s3 = [s3, s4];
                s2 = s3;
            }
            else {
                peg$currPos = s2;
                s2 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s2;
            s2 = peg$FAILED;
        }
        if (s2 !== peg$FAILED) {
            while (s2 !== peg$FAILED) {
                s1.push(s2);
                s2 = peg$currPos;
                s3 = peg$currPos;
                peg$silentFails++;
                s4 = peg$parsepatternWhiteSpace();
                if (s4 === peg$FAILED) {
                    if (peg$c9.test(input.charAt(peg$currPos))) {
                        s4 = input.charAt(peg$currPos);
                        peg$currPos++;
                    }
                    else {
                        s4 = peg$FAILED;
                        if (peg$silentFails === 0) {
                            peg$fail(peg$c10);
                        }
                    }
                }
                peg$silentFails--;
                if (s4 === peg$FAILED) {
                    s3 = undefined;
                }
                else {
                    peg$currPos = s3;
                    s3 = peg$FAILED;
                }
                if (s3 !== peg$FAILED) {
                    if (input.length > peg$currPos) {
                        s4 = input.charAt(peg$currPos);
                        peg$currPos++;
                    }
                    else {
                        s4 = peg$FAILED;
                        if (peg$silentFails === 0) {
                            peg$fail(peg$c11);
                        }
                    }
                    if (s4 !== peg$FAILED) {
                        s3 = [s3, s4];
                        s2 = s3;
                    }
                    else {
                        peg$currPos = s2;
                        s2 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s2;
                    s2 = peg$FAILED;
                }
            }
        }
        else {
            s1 = peg$FAILED;
        }
        if (s1 !== peg$FAILED) {
            s0 = input.substring(s0, peg$currPos);
        }
        else {
            s0 = s1;
        }
        peg$silentFails--;
        if (s0 === peg$FAILED) {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c8);
            }
        }
        return s0;
    }
    function peg$parsenumberSkeletonTokenOption() {
        var s0, s1, s2;
        peg$silentFails++;
        s0 = peg$currPos;
        if (input.charCodeAt(peg$currPos) === 47) {
            s1 = peg$c13;
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c14);
            }
        }
        if (s1 !== peg$FAILED) {
            s2 = peg$parsenumberSkeletonId();
            if (s2 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c15(s2);
                s0 = s1;
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        peg$silentFails--;
        if (s0 === peg$FAILED) {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c12);
            }
        }
        return s0;
    }
    function peg$parsenumberSkeletonToken() {
        var s0, s1, s2, s3, s4;
        peg$silentFails++;
        s0 = peg$currPos;
        s1 = peg$parse_();
        if (s1 !== peg$FAILED) {
            s2 = peg$parsenumberSkeletonId();
            if (s2 !== peg$FAILED) {
                s3 = [];
                s4 = peg$parsenumberSkeletonTokenOption();
                while (s4 !== peg$FAILED) {
                    s3.push(s4);
                    s4 = peg$parsenumberSkeletonTokenOption();
                }
                if (s3 !== peg$FAILED) {
                    peg$savedPos = s0;
                    s1 = peg$c17(s2, s3);
                    s0 = s1;
                }
                else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        peg$silentFails--;
        if (s0 === peg$FAILED) {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c16);
            }
        }
        return s0;
    }
    function peg$parsenumberSkeleton() {
        var s0, s1, s2;
        s0 = peg$currPos;
        s1 = [];
        s2 = peg$parsenumberSkeletonToken();
        if (s2 !== peg$FAILED) {
            while (s2 !== peg$FAILED) {
                s1.push(s2);
                s2 = peg$parsenumberSkeletonToken();
            }
        }
        else {
            s1 = peg$FAILED;
        }
        if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c18(s1);
        }
        s0 = s1;
        return s0;
    }
    function peg$parsenumberArgStyle() {
        var s0, s1, s2;
        s0 = peg$currPos;
        if (input.substr(peg$currPos, 2) === peg$c19) {
            s1 = peg$c19;
            peg$currPos += 2;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c20);
            }
        }
        if (s1 !== peg$FAILED) {
            s2 = peg$parsenumberSkeleton();
            if (s2 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c21(s2);
                s0 = s1;
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        if (s0 === peg$FAILED) {
            s0 = peg$currPos;
            s1 = peg$parsemessageText();
            if (s1 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c22(s1);
            }
            s0 = s1;
        }
        return s0;
    }
    function peg$parsenumberFormatElement() {
        var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12;
        s0 = peg$currPos;
        if (input.charCodeAt(peg$currPos) === 123) {
            s1 = peg$c3;
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c4);
            }
        }
        if (s1 !== peg$FAILED) {
            s2 = peg$parse_();
            if (s2 !== peg$FAILED) {
                s3 = peg$parseargNameOrNumber();
                if (s3 !== peg$FAILED) {
                    s4 = peg$parse_();
                    if (s4 !== peg$FAILED) {
                        if (input.charCodeAt(peg$currPos) === 44) {
                            s5 = peg$c23;
                            peg$currPos++;
                        }
                        else {
                            s5 = peg$FAILED;
                            if (peg$silentFails === 0) {
                                peg$fail(peg$c24);
                            }
                        }
                        if (s5 !== peg$FAILED) {
                            s6 = peg$parse_();
                            if (s6 !== peg$FAILED) {
                                if (input.substr(peg$currPos, 6) === peg$c25) {
                                    s7 = peg$c25;
                                    peg$currPos += 6;
                                }
                                else {
                                    s7 = peg$FAILED;
                                    if (peg$silentFails === 0) {
                                        peg$fail(peg$c26);
                                    }
                                }
                                if (s7 !== peg$FAILED) {
                                    s8 = peg$parse_();
                                    if (s8 !== peg$FAILED) {
                                        s9 = peg$currPos;
                                        if (input.charCodeAt(peg$currPos) === 44) {
                                            s10 = peg$c23;
                                            peg$currPos++;
                                        }
                                        else {
                                            s10 = peg$FAILED;
                                            if (peg$silentFails === 0) {
                                                peg$fail(peg$c24);
                                            }
                                        }
                                        if (s10 !== peg$FAILED) {
                                            s11 = peg$parse_();
                                            if (s11 !== peg$FAILED) {
                                                s12 = peg$parsenumberArgStyle();
                                                if (s12 !== peg$FAILED) {
                                                    s10 = [s10, s11, s12];
                                                    s9 = s10;
                                                }
                                                else {
                                                    peg$currPos = s9;
                                                    s9 = peg$FAILED;
                                                }
                                            }
                                            else {
                                                peg$currPos = s9;
                                                s9 = peg$FAILED;
                                            }
                                        }
                                        else {
                                            peg$currPos = s9;
                                            s9 = peg$FAILED;
                                        }
                                        if (s9 === peg$FAILED) {
                                            s9 = null;
                                        }
                                        if (s9 !== peg$FAILED) {
                                            s10 = peg$parse_();
                                            if (s10 !== peg$FAILED) {
                                                if (input.charCodeAt(peg$currPos) === 125) {
                                                    s11 = peg$c5;
                                                    peg$currPos++;
                                                }
                                                else {
                                                    s11 = peg$FAILED;
                                                    if (peg$silentFails === 0) {
                                                        peg$fail(peg$c6);
                                                    }
                                                }
                                                if (s11 !== peg$FAILED) {
                                                    peg$savedPos = s0;
                                                    s1 = peg$c27(s3, s7, s9);
                                                    s0 = s1;
                                                }
                                                else {
                                                    peg$currPos = s0;
                                                    s0 = peg$FAILED;
                                                }
                                            }
                                            else {
                                                peg$currPos = s0;
                                                s0 = peg$FAILED;
                                            }
                                        }
                                        else {
                                            peg$currPos = s0;
                                            s0 = peg$FAILED;
                                        }
                                    }
                                    else {
                                        peg$currPos = s0;
                                        s0 = peg$FAILED;
                                    }
                                }
                                else {
                                    peg$currPos = s0;
                                    s0 = peg$FAILED;
                                }
                            }
                            else {
                                peg$currPos = s0;
                                s0 = peg$FAILED;
                            }
                        }
                        else {
                            peg$currPos = s0;
                            s0 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s0;
                        s0 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        return s0;
    }
    function peg$parsedateTimeSkeletonLiteral() {
        var s0, s1, s2, s3;
        s0 = peg$currPos;
        if (input.charCodeAt(peg$currPos) === 39) {
            s1 = peg$c28;
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c29);
            }
        }
        if (s1 !== peg$FAILED) {
            s2 = [];
            s3 = peg$parsedoubleApostrophes();
            if (s3 === peg$FAILED) {
                if (peg$c30.test(input.charAt(peg$currPos))) {
                    s3 = input.charAt(peg$currPos);
                    peg$currPos++;
                }
                else {
                    s3 = peg$FAILED;
                    if (peg$silentFails === 0) {
                        peg$fail(peg$c31);
                    }
                }
            }
            if (s3 !== peg$FAILED) {
                while (s3 !== peg$FAILED) {
                    s2.push(s3);
                    s3 = peg$parsedoubleApostrophes();
                    if (s3 === peg$FAILED) {
                        if (peg$c30.test(input.charAt(peg$currPos))) {
                            s3 = input.charAt(peg$currPos);
                            peg$currPos++;
                        }
                        else {
                            s3 = peg$FAILED;
                            if (peg$silentFails === 0) {
                                peg$fail(peg$c31);
                            }
                        }
                    }
                }
            }
            else {
                s2 = peg$FAILED;
            }
            if (s2 !== peg$FAILED) {
                if (input.charCodeAt(peg$currPos) === 39) {
                    s3 = peg$c28;
                    peg$currPos++;
                }
                else {
                    s3 = peg$FAILED;
                    if (peg$silentFails === 0) {
                        peg$fail(peg$c29);
                    }
                }
                if (s3 !== peg$FAILED) {
                    s1 = [s1, s2, s3];
                    s0 = s1;
                }
                else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        if (s0 === peg$FAILED) {
            s0 = [];
            s1 = peg$parsedoubleApostrophes();
            if (s1 === peg$FAILED) {
                if (peg$c32.test(input.charAt(peg$currPos))) {
                    s1 = input.charAt(peg$currPos);
                    peg$currPos++;
                }
                else {
                    s1 = peg$FAILED;
                    if (peg$silentFails === 0) {
                        peg$fail(peg$c33);
                    }
                }
            }
            if (s1 !== peg$FAILED) {
                while (s1 !== peg$FAILED) {
                    s0.push(s1);
                    s1 = peg$parsedoubleApostrophes();
                    if (s1 === peg$FAILED) {
                        if (peg$c32.test(input.charAt(peg$currPos))) {
                            s1 = input.charAt(peg$currPos);
                            peg$currPos++;
                        }
                        else {
                            s1 = peg$FAILED;
                            if (peg$silentFails === 0) {
                                peg$fail(peg$c33);
                            }
                        }
                    }
                }
            }
            else {
                s0 = peg$FAILED;
            }
        }
        return s0;
    }
    function peg$parsedateTimeSkeletonPattern() {
        var s0, s1;
        s0 = [];
        if (peg$c34.test(input.charAt(peg$currPos))) {
            s1 = input.charAt(peg$currPos);
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c35);
            }
        }
        if (s1 !== peg$FAILED) {
            while (s1 !== peg$FAILED) {
                s0.push(s1);
                if (peg$c34.test(input.charAt(peg$currPos))) {
                    s1 = input.charAt(peg$currPos);
                    peg$currPos++;
                }
                else {
                    s1 = peg$FAILED;
                    if (peg$silentFails === 0) {
                        peg$fail(peg$c35);
                    }
                }
            }
        }
        else {
            s0 = peg$FAILED;
        }
        return s0;
    }
    function peg$parsedateTimeSkeleton() {
        var s0, s1, s2, s3;
        s0 = peg$currPos;
        s1 = peg$currPos;
        s2 = [];
        s3 = peg$parsedateTimeSkeletonLiteral();
        if (s3 === peg$FAILED) {
            s3 = peg$parsedateTimeSkeletonPattern();
        }
        if (s3 !== peg$FAILED) {
            while (s3 !== peg$FAILED) {
                s2.push(s3);
                s3 = peg$parsedateTimeSkeletonLiteral();
                if (s3 === peg$FAILED) {
                    s3 = peg$parsedateTimeSkeletonPattern();
                }
            }
        }
        else {
            s2 = peg$FAILED;
        }
        if (s2 !== peg$FAILED) {
            s1 = input.substring(s1, peg$currPos);
        }
        else {
            s1 = s2;
        }
        if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c36(s1);
        }
        s0 = s1;
        return s0;
    }
    function peg$parsedateOrTimeArgStyle() {
        var s0, s1, s2;
        s0 = peg$currPos;
        if (input.substr(peg$currPos, 2) === peg$c19) {
            s1 = peg$c19;
            peg$currPos += 2;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c20);
            }
        }
        if (s1 !== peg$FAILED) {
            s2 = peg$parsedateTimeSkeleton();
            if (s2 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c21(s2);
                s0 = s1;
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        if (s0 === peg$FAILED) {
            s0 = peg$currPos;
            s1 = peg$parsemessageText();
            if (s1 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c22(s1);
            }
            s0 = s1;
        }
        return s0;
    }
    function peg$parsedateOrTimeFormatElement() {
        var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12;
        s0 = peg$currPos;
        if (input.charCodeAt(peg$currPos) === 123) {
            s1 = peg$c3;
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c4);
            }
        }
        if (s1 !== peg$FAILED) {
            s2 = peg$parse_();
            if (s2 !== peg$FAILED) {
                s3 = peg$parseargNameOrNumber();
                if (s3 !== peg$FAILED) {
                    s4 = peg$parse_();
                    if (s4 !== peg$FAILED) {
                        if (input.charCodeAt(peg$currPos) === 44) {
                            s5 = peg$c23;
                            peg$currPos++;
                        }
                        else {
                            s5 = peg$FAILED;
                            if (peg$silentFails === 0) {
                                peg$fail(peg$c24);
                            }
                        }
                        if (s5 !== peg$FAILED) {
                            s6 = peg$parse_();
                            if (s6 !== peg$FAILED) {
                                if (input.substr(peg$currPos, 4) === peg$c37) {
                                    s7 = peg$c37;
                                    peg$currPos += 4;
                                }
                                else {
                                    s7 = peg$FAILED;
                                    if (peg$silentFails === 0) {
                                        peg$fail(peg$c38);
                                    }
                                }
                                if (s7 === peg$FAILED) {
                                    if (input.substr(peg$currPos, 4) === peg$c39) {
                                        s7 = peg$c39;
                                        peg$currPos += 4;
                                    }
                                    else {
                                        s7 = peg$FAILED;
                                        if (peg$silentFails === 0) {
                                            peg$fail(peg$c40);
                                        }
                                    }
                                }
                                if (s7 !== peg$FAILED) {
                                    s8 = peg$parse_();
                                    if (s8 !== peg$FAILED) {
                                        s9 = peg$currPos;
                                        if (input.charCodeAt(peg$currPos) === 44) {
                                            s10 = peg$c23;
                                            peg$currPos++;
                                        }
                                        else {
                                            s10 = peg$FAILED;
                                            if (peg$silentFails === 0) {
                                                peg$fail(peg$c24);
                                            }
                                        }
                                        if (s10 !== peg$FAILED) {
                                            s11 = peg$parse_();
                                            if (s11 !== peg$FAILED) {
                                                s12 = peg$parsedateOrTimeArgStyle();
                                                if (s12 !== peg$FAILED) {
                                                    s10 = [s10, s11, s12];
                                                    s9 = s10;
                                                }
                                                else {
                                                    peg$currPos = s9;
                                                    s9 = peg$FAILED;
                                                }
                                            }
                                            else {
                                                peg$currPos = s9;
                                                s9 = peg$FAILED;
                                            }
                                        }
                                        else {
                                            peg$currPos = s9;
                                            s9 = peg$FAILED;
                                        }
                                        if (s9 === peg$FAILED) {
                                            s9 = null;
                                        }
                                        if (s9 !== peg$FAILED) {
                                            s10 = peg$parse_();
                                            if (s10 !== peg$FAILED) {
                                                if (input.charCodeAt(peg$currPos) === 125) {
                                                    s11 = peg$c5;
                                                    peg$currPos++;
                                                }
                                                else {
                                                    s11 = peg$FAILED;
                                                    if (peg$silentFails === 0) {
                                                        peg$fail(peg$c6);
                                                    }
                                                }
                                                if (s11 !== peg$FAILED) {
                                                    peg$savedPos = s0;
                                                    s1 = peg$c27(s3, s7, s9);
                                                    s0 = s1;
                                                }
                                                else {
                                                    peg$currPos = s0;
                                                    s0 = peg$FAILED;
                                                }
                                            }
                                            else {
                                                peg$currPos = s0;
                                                s0 = peg$FAILED;
                                            }
                                        }
                                        else {
                                            peg$currPos = s0;
                                            s0 = peg$FAILED;
                                        }
                                    }
                                    else {
                                        peg$currPos = s0;
                                        s0 = peg$FAILED;
                                    }
                                }
                                else {
                                    peg$currPos = s0;
                                    s0 = peg$FAILED;
                                }
                            }
                            else {
                                peg$currPos = s0;
                                s0 = peg$FAILED;
                            }
                        }
                        else {
                            peg$currPos = s0;
                            s0 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s0;
                        s0 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        return s0;
    }
    function peg$parsesimpleFormatElement() {
        var s0;
        s0 = peg$parsenumberFormatElement();
        if (s0 === peg$FAILED) {
            s0 = peg$parsedateOrTimeFormatElement();
        }
        return s0;
    }
    function peg$parsepluralElement() {
        var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15;
        s0 = peg$currPos;
        if (input.charCodeAt(peg$currPos) === 123) {
            s1 = peg$c3;
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c4);
            }
        }
        if (s1 !== peg$FAILED) {
            s2 = peg$parse_();
            if (s2 !== peg$FAILED) {
                s3 = peg$parseargNameOrNumber();
                if (s3 !== peg$FAILED) {
                    s4 = peg$parse_();
                    if (s4 !== peg$FAILED) {
                        if (input.charCodeAt(peg$currPos) === 44) {
                            s5 = peg$c23;
                            peg$currPos++;
                        }
                        else {
                            s5 = peg$FAILED;
                            if (peg$silentFails === 0) {
                                peg$fail(peg$c24);
                            }
                        }
                        if (s5 !== peg$FAILED) {
                            s6 = peg$parse_();
                            if (s6 !== peg$FAILED) {
                                if (input.substr(peg$currPos, 6) === peg$c41) {
                                    s7 = peg$c41;
                                    peg$currPos += 6;
                                }
                                else {
                                    s7 = peg$FAILED;
                                    if (peg$silentFails === 0) {
                                        peg$fail(peg$c42);
                                    }
                                }
                                if (s7 === peg$FAILED) {
                                    if (input.substr(peg$currPos, 13) === peg$c43) {
                                        s7 = peg$c43;
                                        peg$currPos += 13;
                                    }
                                    else {
                                        s7 = peg$FAILED;
                                        if (peg$silentFails === 0) {
                                            peg$fail(peg$c44);
                                        }
                                    }
                                }
                                if (s7 !== peg$FAILED) {
                                    s8 = peg$parse_();
                                    if (s8 !== peg$FAILED) {
                                        if (input.charCodeAt(peg$currPos) === 44) {
                                            s9 = peg$c23;
                                            peg$currPos++;
                                        }
                                        else {
                                            s9 = peg$FAILED;
                                            if (peg$silentFails === 0) {
                                                peg$fail(peg$c24);
                                            }
                                        }
                                        if (s9 !== peg$FAILED) {
                                            s10 = peg$parse_();
                                            if (s10 !== peg$FAILED) {
                                                s11 = peg$currPos;
                                                if (input.substr(peg$currPos, 7) === peg$c45) {
                                                    s12 = peg$c45;
                                                    peg$currPos += 7;
                                                }
                                                else {
                                                    s12 = peg$FAILED;
                                                    if (peg$silentFails === 0) {
                                                        peg$fail(peg$c46);
                                                    }
                                                }
                                                if (s12 !== peg$FAILED) {
                                                    s13 = peg$parse_();
                                                    if (s13 !== peg$FAILED) {
                                                        s14 = peg$parsenumber();
                                                        if (s14 !== peg$FAILED) {
                                                            s12 = [s12, s13, s14];
                                                            s11 = s12;
                                                        }
                                                        else {
                                                            peg$currPos = s11;
                                                            s11 = peg$FAILED;
                                                        }
                                                    }
                                                    else {
                                                        peg$currPos = s11;
                                                        s11 = peg$FAILED;
                                                    }
                                                }
                                                else {
                                                    peg$currPos = s11;
                                                    s11 = peg$FAILED;
                                                }
                                                if (s11 === peg$FAILED) {
                                                    s11 = null;
                                                }
                                                if (s11 !== peg$FAILED) {
                                                    s12 = peg$parse_();
                                                    if (s12 !== peg$FAILED) {
                                                        s13 = [];
                                                        s14 = peg$parsepluralOption();
                                                        if (s14 !== peg$FAILED) {
                                                            while (s14 !== peg$FAILED) {
                                                                s13.push(s14);
                                                                s14 = peg$parsepluralOption();
                                                            }
                                                        }
                                                        else {
                                                            s13 = peg$FAILED;
                                                        }
                                                        if (s13 !== peg$FAILED) {
                                                            s14 = peg$parse_();
                                                            if (s14 !== peg$FAILED) {
                                                                if (input.charCodeAt(peg$currPos) === 125) {
                                                                    s15 = peg$c5;
                                                                    peg$currPos++;
                                                                }
                                                                else {
                                                                    s15 = peg$FAILED;
                                                                    if (peg$silentFails === 0) {
                                                                        peg$fail(peg$c6);
                                                                    }
                                                                }
                                                                if (s15 !== peg$FAILED) {
                                                                    peg$savedPos = s0;
                                                                    s1 = peg$c47(s3, s7, s11, s13);
                                                                    s0 = s1;
                                                                }
                                                                else {
                                                                    peg$currPos = s0;
                                                                    s0 = peg$FAILED;
                                                                }
                                                            }
                                                            else {
                                                                peg$currPos = s0;
                                                                s0 = peg$FAILED;
                                                            }
                                                        }
                                                        else {
                                                            peg$currPos = s0;
                                                            s0 = peg$FAILED;
                                                        }
                                                    }
                                                    else {
                                                        peg$currPos = s0;
                                                        s0 = peg$FAILED;
                                                    }
                                                }
                                                else {
                                                    peg$currPos = s0;
                                                    s0 = peg$FAILED;
                                                }
                                            }
                                            else {
                                                peg$currPos = s0;
                                                s0 = peg$FAILED;
                                            }
                                        }
                                        else {
                                            peg$currPos = s0;
                                            s0 = peg$FAILED;
                                        }
                                    }
                                    else {
                                        peg$currPos = s0;
                                        s0 = peg$FAILED;
                                    }
                                }
                                else {
                                    peg$currPos = s0;
                                    s0 = peg$FAILED;
                                }
                            }
                            else {
                                peg$currPos = s0;
                                s0 = peg$FAILED;
                            }
                        }
                        else {
                            peg$currPos = s0;
                            s0 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s0;
                        s0 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        return s0;
    }
    function peg$parseselectElement() {
        var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;
        s0 = peg$currPos;
        if (input.charCodeAt(peg$currPos) === 123) {
            s1 = peg$c3;
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c4);
            }
        }
        if (s1 !== peg$FAILED) {
            s2 = peg$parse_();
            if (s2 !== peg$FAILED) {
                s3 = peg$parseargNameOrNumber();
                if (s3 !== peg$FAILED) {
                    s4 = peg$parse_();
                    if (s4 !== peg$FAILED) {
                        if (input.charCodeAt(peg$currPos) === 44) {
                            s5 = peg$c23;
                            peg$currPos++;
                        }
                        else {
                            s5 = peg$FAILED;
                            if (peg$silentFails === 0) {
                                peg$fail(peg$c24);
                            }
                        }
                        if (s5 !== peg$FAILED) {
                            s6 = peg$parse_();
                            if (s6 !== peg$FAILED) {
                                if (input.substr(peg$currPos, 6) === peg$c48) {
                                    s7 = peg$c48;
                                    peg$currPos += 6;
                                }
                                else {
                                    s7 = peg$FAILED;
                                    if (peg$silentFails === 0) {
                                        peg$fail(peg$c49);
                                    }
                                }
                                if (s7 !== peg$FAILED) {
                                    s8 = peg$parse_();
                                    if (s8 !== peg$FAILED) {
                                        if (input.charCodeAt(peg$currPos) === 44) {
                                            s9 = peg$c23;
                                            peg$currPos++;
                                        }
                                        else {
                                            s9 = peg$FAILED;
                                            if (peg$silentFails === 0) {
                                                peg$fail(peg$c24);
                                            }
                                        }
                                        if (s9 !== peg$FAILED) {
                                            s10 = peg$parse_();
                                            if (s10 !== peg$FAILED) {
                                                s11 = [];
                                                s12 = peg$parseselectOption();
                                                if (s12 !== peg$FAILED) {
                                                    while (s12 !== peg$FAILED) {
                                                        s11.push(s12);
                                                        s12 = peg$parseselectOption();
                                                    }
                                                }
                                                else {
                                                    s11 = peg$FAILED;
                                                }
                                                if (s11 !== peg$FAILED) {
                                                    s12 = peg$parse_();
                                                    if (s12 !== peg$FAILED) {
                                                        if (input.charCodeAt(peg$currPos) === 125) {
                                                            s13 = peg$c5;
                                                            peg$currPos++;
                                                        }
                                                        else {
                                                            s13 = peg$FAILED;
                                                            if (peg$silentFails === 0) {
                                                                peg$fail(peg$c6);
                                                            }
                                                        }
                                                        if (s13 !== peg$FAILED) {
                                                            peg$savedPos = s0;
                                                            s1 = peg$c50(s3, s11);
                                                            s0 = s1;
                                                        }
                                                        else {
                                                            peg$currPos = s0;
                                                            s0 = peg$FAILED;
                                                        }
                                                    }
                                                    else {
                                                        peg$currPos = s0;
                                                        s0 = peg$FAILED;
                                                    }
                                                }
                                                else {
                                                    peg$currPos = s0;
                                                    s0 = peg$FAILED;
                                                }
                                            }
                                            else {
                                                peg$currPos = s0;
                                                s0 = peg$FAILED;
                                            }
                                        }
                                        else {
                                            peg$currPos = s0;
                                            s0 = peg$FAILED;
                                        }
                                    }
                                    else {
                                        peg$currPos = s0;
                                        s0 = peg$FAILED;
                                    }
                                }
                                else {
                                    peg$currPos = s0;
                                    s0 = peg$FAILED;
                                }
                            }
                            else {
                                peg$currPos = s0;
                                s0 = peg$FAILED;
                            }
                        }
                        else {
                            peg$currPos = s0;
                            s0 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s0;
                        s0 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        return s0;
    }
    function peg$parsepluralRuleSelectValue() {
        var s0, s1, s2, s3;
        s0 = peg$currPos;
        s1 = peg$currPos;
        if (input.charCodeAt(peg$currPos) === 61) {
            s2 = peg$c51;
            peg$currPos++;
        }
        else {
            s2 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c52);
            }
        }
        if (s2 !== peg$FAILED) {
            s3 = peg$parsenumber();
            if (s3 !== peg$FAILED) {
                s2 = [s2, s3];
                s1 = s2;
            }
            else {
                peg$currPos = s1;
                s1 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s1;
            s1 = peg$FAILED;
        }
        if (s1 !== peg$FAILED) {
            s0 = input.substring(s0, peg$currPos);
        }
        else {
            s0 = s1;
        }
        if (s0 === peg$FAILED) {
            s0 = peg$parseargName();
        }
        return s0;
    }
    function peg$parseselectOption() {
        var s0, s1, s2, s3, s4, s5, s6;
        s0 = peg$currPos;
        s1 = peg$parse_();
        if (s1 !== peg$FAILED) {
            s2 = peg$parseargName();
            if (s2 !== peg$FAILED) {
                s3 = peg$parse_();
                if (s3 !== peg$FAILED) {
                    if (input.charCodeAt(peg$currPos) === 123) {
                        s4 = peg$c3;
                        peg$currPos++;
                    }
                    else {
                        s4 = peg$FAILED;
                        if (peg$silentFails === 0) {
                            peg$fail(peg$c4);
                        }
                    }
                    if (s4 !== peg$FAILED) {
                        s5 = peg$parsemessage();
                        if (s5 !== peg$FAILED) {
                            if (input.charCodeAt(peg$currPos) === 125) {
                                s6 = peg$c5;
                                peg$currPos++;
                            }
                            else {
                                s6 = peg$FAILED;
                                if (peg$silentFails === 0) {
                                    peg$fail(peg$c6);
                                }
                            }
                            if (s6 !== peg$FAILED) {
                                peg$savedPos = s0;
                                s1 = peg$c53(s2, s5);
                                s0 = s1;
                            }
                            else {
                                peg$currPos = s0;
                                s0 = peg$FAILED;
                            }
                        }
                        else {
                            peg$currPos = s0;
                            s0 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s0;
                        s0 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        return s0;
    }
    function peg$parsepluralOption() {
        var s0, s1, s2, s3, s4, s5, s6;
        s0 = peg$currPos;
        s1 = peg$parse_();
        if (s1 !== peg$FAILED) {
            s2 = peg$parsepluralRuleSelectValue();
            if (s2 !== peg$FAILED) {
                s3 = peg$parse_();
                if (s3 !== peg$FAILED) {
                    if (input.charCodeAt(peg$currPos) === 123) {
                        s4 = peg$c3;
                        peg$currPos++;
                    }
                    else {
                        s4 = peg$FAILED;
                        if (peg$silentFails === 0) {
                            peg$fail(peg$c4);
                        }
                    }
                    if (s4 !== peg$FAILED) {
                        s5 = peg$parsemessage();
                        if (s5 !== peg$FAILED) {
                            if (input.charCodeAt(peg$currPos) === 125) {
                                s6 = peg$c5;
                                peg$currPos++;
                            }
                            else {
                                s6 = peg$FAILED;
                                if (peg$silentFails === 0) {
                                    peg$fail(peg$c6);
                                }
                            }
                            if (s6 !== peg$FAILED) {
                                peg$savedPos = s0;
                                s1 = peg$c54(s2, s5);
                                s0 = s1;
                            }
                            else {
                                peg$currPos = s0;
                                s0 = peg$FAILED;
                            }
                        }
                        else {
                            peg$currPos = s0;
                            s0 = peg$FAILED;
                        }
                    }
                    else {
                        peg$currPos = s0;
                        s0 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        return s0;
    }
    function peg$parsepatternWhiteSpace() {
        var s0, s1;
        peg$silentFails++;
        if (peg$c56.test(input.charAt(peg$currPos))) {
            s0 = input.charAt(peg$currPos);
            peg$currPos++;
        }
        else {
            s0 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c57);
            }
        }
        peg$silentFails--;
        if (s0 === peg$FAILED) {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c55);
            }
        }
        return s0;
    }
    function peg$parsepatternSyntax() {
        var s0, s1;
        peg$silentFails++;
        if (peg$c59.test(input.charAt(peg$currPos))) {
            s0 = input.charAt(peg$currPos);
            peg$currPos++;
        }
        else {
            s0 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c60);
            }
        }
        peg$silentFails--;
        if (s0 === peg$FAILED) {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c58);
            }
        }
        return s0;
    }
    function peg$parse_() {
        var s0, s1, s2;
        peg$silentFails++;
        s0 = peg$currPos;
        s1 = [];
        s2 = peg$parsepatternWhiteSpace();
        while (s2 !== peg$FAILED) {
            s1.push(s2);
            s2 = peg$parsepatternWhiteSpace();
        }
        if (s1 !== peg$FAILED) {
            s0 = input.substring(s0, peg$currPos);
        }
        else {
            s0 = s1;
        }
        peg$silentFails--;
        if (s0 === peg$FAILED) {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c61);
            }
        }
        return s0;
    }
    function peg$parsenumber() {
        var s0, s1, s2;
        peg$silentFails++;
        s0 = peg$currPos;
        if (input.charCodeAt(peg$currPos) === 45) {
            s1 = peg$c63;
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c64);
            }
        }
        if (s1 === peg$FAILED) {
            s1 = null;
        }
        if (s1 !== peg$FAILED) {
            s2 = peg$parseargNumber();
            if (s2 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c65(s1, s2);
                s0 = s1;
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        peg$silentFails--;
        if (s0 === peg$FAILED) {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c62);
            }
        }
        return s0;
    }
    function peg$parseapostrophe() {
        var s0, s1;
        peg$silentFails++;
        if (input.charCodeAt(peg$currPos) === 39) {
            s0 = peg$c28;
            peg$currPos++;
        }
        else {
            s0 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c29);
            }
        }
        peg$silentFails--;
        if (s0 === peg$FAILED) {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c66);
            }
        }
        return s0;
    }
    function peg$parsedoubleApostrophes() {
        var s0, s1;
        peg$silentFails++;
        s0 = peg$currPos;
        if (input.substr(peg$currPos, 2) === peg$c68) {
            s1 = peg$c68;
            peg$currPos += 2;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c69);
            }
        }
        if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c70();
        }
        s0 = s1;
        peg$silentFails--;
        if (s0 === peg$FAILED) {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c67);
            }
        }
        return s0;
    }
    function peg$parsequotedString() {
        var s0, s1, s2, s3, s4, s5;
        s0 = peg$currPos;
        if (input.charCodeAt(peg$currPos) === 39) {
            s1 = peg$c28;
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c29);
            }
        }
        if (s1 !== peg$FAILED) {
            if (peg$c71.test(input.charAt(peg$currPos))) {
                s2 = input.charAt(peg$currPos);
                peg$currPos++;
            }
            else {
                s2 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c72);
                }
            }
            if (s2 !== peg$FAILED) {
                s3 = peg$currPos;
                s4 = [];
                if (input.substr(peg$currPos, 2) === peg$c68) {
                    s5 = peg$c68;
                    peg$currPos += 2;
                }
                else {
                    s5 = peg$FAILED;
                    if (peg$silentFails === 0) {
                        peg$fail(peg$c69);
                    }
                }
                if (s5 === peg$FAILED) {
                    if (peg$c30.test(input.charAt(peg$currPos))) {
                        s5 = input.charAt(peg$currPos);
                        peg$currPos++;
                    }
                    else {
                        s5 = peg$FAILED;
                        if (peg$silentFails === 0) {
                            peg$fail(peg$c31);
                        }
                    }
                }
                while (s5 !== peg$FAILED) {
                    s4.push(s5);
                    if (input.substr(peg$currPos, 2) === peg$c68) {
                        s5 = peg$c68;
                        peg$currPos += 2;
                    }
                    else {
                        s5 = peg$FAILED;
                        if (peg$silentFails === 0) {
                            peg$fail(peg$c69);
                        }
                    }
                    if (s5 === peg$FAILED) {
                        if (peg$c30.test(input.charAt(peg$currPos))) {
                            s5 = input.charAt(peg$currPos);
                            peg$currPos++;
                        }
                        else {
                            s5 = peg$FAILED;
                            if (peg$silentFails === 0) {
                                peg$fail(peg$c31);
                            }
                        }
                    }
                }
                if (s4 !== peg$FAILED) {
                    s3 = input.substring(s3, peg$currPos);
                }
                else {
                    s3 = s4;
                }
                if (s3 !== peg$FAILED) {
                    if (input.charCodeAt(peg$currPos) === 39) {
                        s4 = peg$c28;
                        peg$currPos++;
                    }
                    else {
                        s4 = peg$FAILED;
                        if (peg$silentFails === 0) {
                            peg$fail(peg$c29);
                        }
                    }
                    if (s4 !== peg$FAILED) {
                        peg$savedPos = s0;
                        s1 = peg$c73(s2, s3);
                        s0 = s1;
                    }
                    else {
                        peg$currPos = s0;
                        s0 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s0;
                    s0 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s0;
                s0 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s0;
            s0 = peg$FAILED;
        }
        return s0;
    }
    function peg$parseunquotedString() {
        var s0, s1;
        s0 = peg$currPos;
        if (peg$c74.test(input.charAt(peg$currPos))) {
            s1 = input.charAt(peg$currPos);
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c75);
            }
        }
        if (s1 !== peg$FAILED) {
            s0 = input.substring(s0, peg$currPos);
        }
        else {
            s0 = s1;
        }
        return s0;
    }
    function peg$parseargNameOrNumber() {
        var s0, s1;
        peg$silentFails++;
        s0 = peg$currPos;
        s1 = peg$parseargNumber();
        if (s1 === peg$FAILED) {
            s1 = peg$parseargName();
        }
        if (s1 !== peg$FAILED) {
            s0 = input.substring(s0, peg$currPos);
        }
        else {
            s0 = s1;
        }
        peg$silentFails--;
        if (s0 === peg$FAILED) {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c76);
            }
        }
        return s0;
    }
    function peg$parseargNumber() {
        var s0, s1, s2, s3, s4;
        peg$silentFails++;
        s0 = peg$currPos;
        if (input.charCodeAt(peg$currPos) === 48) {
            s1 = peg$c78;
            peg$currPos++;
        }
        else {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c79);
            }
        }
        if (s1 !== peg$FAILED) {
            peg$savedPos = s0;
            s1 = peg$c80();
        }
        s0 = s1;
        if (s0 === peg$FAILED) {
            s0 = peg$currPos;
            s1 = peg$currPos;
            if (peg$c81.test(input.charAt(peg$currPos))) {
                s2 = input.charAt(peg$currPos);
                peg$currPos++;
            }
            else {
                s2 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c82);
                }
            }
            if (s2 !== peg$FAILED) {
                s3 = [];
                if (peg$c83.test(input.charAt(peg$currPos))) {
                    s4 = input.charAt(peg$currPos);
                    peg$currPos++;
                }
                else {
                    s4 = peg$FAILED;
                    if (peg$silentFails === 0) {
                        peg$fail(peg$c84);
                    }
                }
                while (s4 !== peg$FAILED) {
                    s3.push(s4);
                    if (peg$c83.test(input.charAt(peg$currPos))) {
                        s4 = input.charAt(peg$currPos);
                        peg$currPos++;
                    }
                    else {
                        s4 = peg$FAILED;
                        if (peg$silentFails === 0) {
                            peg$fail(peg$c84);
                        }
                    }
                }
                if (s3 !== peg$FAILED) {
                    s2 = [s2, s3];
                    s1 = s2;
                }
                else {
                    peg$currPos = s1;
                    s1 = peg$FAILED;
                }
            }
            else {
                peg$currPos = s1;
                s1 = peg$FAILED;
            }
            if (s1 !== peg$FAILED) {
                peg$savedPos = s0;
                s1 = peg$c85(s1);
            }
            s0 = s1;
        }
        peg$silentFails--;
        if (s0 === peg$FAILED) {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c77);
            }
        }
        return s0;
    }
    function peg$parseargName() {
        var s0, s1, s2, s3, s4;
        peg$silentFails++;
        s0 = peg$currPos;
        s1 = [];
        s2 = peg$currPos;
        s3 = peg$currPos;
        peg$silentFails++;
        s4 = peg$parsepatternWhiteSpace();
        if (s4 === peg$FAILED) {
            s4 = peg$parsepatternSyntax();
        }
        peg$silentFails--;
        if (s4 === peg$FAILED) {
            s3 = undefined;
        }
        else {
            peg$currPos = s3;
            s3 = peg$FAILED;
        }
        if (s3 !== peg$FAILED) {
            if (input.length > peg$currPos) {
                s4 = input.charAt(peg$currPos);
                peg$currPos++;
            }
            else {
                s4 = peg$FAILED;
                if (peg$silentFails === 0) {
                    peg$fail(peg$c11);
                }
            }
            if (s4 !== peg$FAILED) {
                s3 = [s3, s4];
                s2 = s3;
            }
            else {
                peg$currPos = s2;
                s2 = peg$FAILED;
            }
        }
        else {
            peg$currPos = s2;
            s2 = peg$FAILED;
        }
        if (s2 !== peg$FAILED) {
            while (s2 !== peg$FAILED) {
                s1.push(s2);
                s2 = peg$currPos;
                s3 = peg$currPos;
                peg$silentFails++;
                s4 = peg$parsepatternWhiteSpace();
                if (s4 === peg$FAILED) {
                    s4 = peg$parsepatternSyntax();
                }
                peg$silentFails--;
                if (s4 === peg$FAILED) {
                    s3 = undefined;
                }
                else {
                    peg$currPos = s3;
                    s3 = peg$FAILED;
                }
                if (s3 !== peg$FAILED) {
                    if (input.length > peg$currPos) {
                        s4 = input.charAt(peg$currPos);
                        peg$currPos++;
                    }
                    else {
                        s4 = peg$FAILED;
                        if (peg$silentFails === 0) {
                            peg$fail(peg$c11);
                        }
                    }
                    if (s4 !== peg$FAILED) {
                        s3 = [s3, s4];
                        s2 = s3;
                    }
                    else {
                        peg$currPos = s2;
                        s2 = peg$FAILED;
                    }
                }
                else {
                    peg$currPos = s2;
                    s2 = peg$FAILED;
                }
            }
        }
        else {
            s1 = peg$FAILED;
        }
        if (s1 !== peg$FAILED) {
            s0 = input.substring(s0, peg$currPos);
        }
        else {
            s0 = s1;
        }
        peg$silentFails--;
        if (s0 === peg$FAILED) {
            s1 = peg$FAILED;
            if (peg$silentFails === 0) {
                peg$fail(peg$c86);
            }
        }
        return s0;
    }
    function insertLocation() {
        return options && options.captureLocation ? {
            location: location()
        } : {};
    }
    peg$result = peg$startRuleFunction();
    if (peg$result !== peg$FAILED && peg$currPos === input.length) {
        return peg$result;
    }
    else {
        if (peg$result !== peg$FAILED && peg$currPos < input.length) {
            peg$fail(peg$endExpectation());
        }
        throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length
            ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)
            : peg$computeLocation(peg$maxFailPos, peg$maxFailPos));
    }
}
var parse = peg$parse;


/***/ }),

/***/ "./node_modules/intl-messageformat-parser/lib/types.js":
/*!*************************************************************!*\
  !*** ./node_modules/intl-messageformat-parser/lib/types.js ***!
  \*************************************************************/
/*! exports provided: TYPE, isLiteralElement, isArgumentElement, isNumberElement, isDateElement, isTimeElement, isSelectElement, isPluralElement, isNumberSkeleton, isDateTimeSkeleton, createLiteralElement, createNumberElement */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TYPE", function() { return TYPE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isLiteralElement", function() { return isLiteralElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArgumentElement", function() { return isArgumentElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumberElement", function() { return isNumberElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDateElement", function() { return isDateElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isTimeElement", function() { return isTimeElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSelectElement", function() { return isSelectElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPluralElement", function() { return isPluralElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumberSkeleton", function() { return isNumberSkeleton; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDateTimeSkeleton", function() { return isDateTimeSkeleton; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createLiteralElement", function() { return createLiteralElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createNumberElement", function() { return createNumberElement; });
var TYPE;
(function (TYPE) {
    /**
     * Raw text
     */
    TYPE[TYPE["literal"] = 0] = "literal";
    /**
     * Variable w/o any format, e.g `var` in `this is a {var}`
     */
    TYPE[TYPE["argument"] = 1] = "argument";
    /**
     * Variable w/ number format
     */
    TYPE[TYPE["number"] = 2] = "number";
    /**
     * Variable w/ date format
     */
    TYPE[TYPE["date"] = 3] = "date";
    /**
     * Variable w/ time format
     */
    TYPE[TYPE["time"] = 4] = "time";
    /**
     * Variable w/ select format
     */
    TYPE[TYPE["select"] = 5] = "select";
    /**
     * Variable w/ plural format
     */
    TYPE[TYPE["plural"] = 6] = "plural";
})(TYPE || (TYPE = {}));
/**
 * Type Guards
 */
function isLiteralElement(el) {
    return el.type === TYPE.literal;
}
function isArgumentElement(el) {
    return el.type === TYPE.argument;
}
function isNumberElement(el) {
    return el.type === TYPE.number;
}
function isDateElement(el) {
    return el.type === TYPE.date;
}
function isTimeElement(el) {
    return el.type === TYPE.time;
}
function isSelectElement(el) {
    return el.type === TYPE.select;
}
function isPluralElement(el) {
    return el.type === TYPE.plural;
}
function isNumberSkeleton(el) {
    return el.type === 0 /* number */;
}
function isDateTimeSkeleton(el) {
    return el.type === 1 /* dateTime */;
}
function createLiteralElement(value) {
    return {
        type: TYPE.literal,
        value: value,
    };
}
function createNumberElement(value, style) {
    return {
        type: TYPE.number,
        value: value,
        style: style,
    };
}


/***/ }),

/***/ "./node_modules/intl-messageformat/lib/core.js":
/*!*****************************************************!*\
  !*** ./node_modules/intl-messageformat/lib/core.js ***!
  \*****************************************************/
/*! exports provided: createDefaultFormatters, IntlMessageFormat, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createDefaultFormatters", function() { return createDefaultFormatters; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IntlMessageFormat", function() { return IntlMessageFormat; });
/* harmony import */ var intl_messageformat_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! intl-messageformat-parser */ "./node_modules/intl-messageformat-parser/lib/index.js");
/* harmony import */ var intl_format_cache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! intl-format-cache */ "./node_modules/intl-format-cache/lib/index.js");
/* harmony import */ var _formatters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatters */ "./node_modules/intl-messageformat/lib/formatters.js");
/*
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
Copyrights licensed under the New BSD License.
See the accompanying LICENSE file for terms.
*/
var __assign = (undefined && undefined.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};



// -- MessageFormat --------------------------------------------------------
function resolveLocale(locales) {
    if (typeof locales === 'string') {
        locales = [locales];
    }
    try {
        return Intl.NumberFormat.supportedLocalesOf(locales, {
            // IE11 localeMatcher `lookup` seems to convert `en` -> `en-US`
            // but not other browsers,
            localeMatcher: 'best fit',
        })[0];
    }
    catch (e) {
        return IntlMessageFormat.defaultLocale;
    }
}
// TODO(skeleton): add skeleton support
function prewarmFormatters(els, locales, formatters, formats) {
    els
        .filter(function (el) { return !Object(intl_messageformat_parser__WEBPACK_IMPORTED_MODULE_0__["isArgumentElement"])(el) && !Object(intl_messageformat_parser__WEBPACK_IMPORTED_MODULE_0__["isLiteralElement"])(el); })
        .forEach(function (el) {
        // Recursively format plural and select parts' option — which can be a
        // nested pattern structure. The choosing of the option to use is
        // abstracted-by and delegated-to the part helper object.
        if (Object(intl_messageformat_parser__WEBPACK_IMPORTED_MODULE_0__["isDateElement"])(el)) {
            var style = typeof el.style === 'string' ? formats.date[el.style] : undefined;
            formatters.getDateTimeFormat(locales, style);
        }
        if (Object(intl_messageformat_parser__WEBPACK_IMPORTED_MODULE_0__["isTimeElement"])(el)) {
            var style = typeof el.style === 'string' ? formats.time[el.style] : undefined;
            formatters.getDateTimeFormat(locales, style);
        }
        if (Object(intl_messageformat_parser__WEBPACK_IMPORTED_MODULE_0__["isNumberElement"])(el)) {
            var style = typeof el.style === 'string' ? formats.number[el.style] : undefined;
            formatters.getNumberFormat(locales, style);
        }
        if (Object(intl_messageformat_parser__WEBPACK_IMPORTED_MODULE_0__["isSelectElement"])(el)) {
            Object.keys(el.options).forEach(function (id) {
                return prewarmFormatters(el.options[id].value, locales, formatters, formats);
            });
        }
        if (Object(intl_messageformat_parser__WEBPACK_IMPORTED_MODULE_0__["isPluralElement"])(el)) {
            formatters.getPluralRules(locales, { type: el.pluralType });
            Object.keys(el.options).forEach(function (id) {
                return prewarmFormatters(el.options[id].value, locales, formatters, formats);
            });
        }
    });
}
function mergeConfig(c1, c2) {
    if (!c2) {
        return c1;
    }
    return __assign({}, (c1 || {}), (c2 || {}), Object.keys(c1).reduce(function (all, k) {
        all[k] = __assign({}, c1[k], (c2[k] || {}));
        return all;
    }, {}));
}
function mergeConfigs(defaultConfig, configs) {
    if (!configs) {
        return defaultConfig;
    }
    return Object.keys(defaultConfig).reduce(function (all, k) {
        all[k] = mergeConfig(defaultConfig[k], configs[k]);
        return all;
    }, __assign({}, defaultConfig));
}
function createDefaultFormatters(cache) {
    if (cache === void 0) { cache = {
        number: {},
        dateTime: {},
        pluralRules: {},
    }; }
    return {
        getNumberFormat: Object(intl_format_cache__WEBPACK_IMPORTED_MODULE_1__["default"])(Intl.NumberFormat, cache.number),
        getDateTimeFormat: Object(intl_format_cache__WEBPACK_IMPORTED_MODULE_1__["default"])(Intl.DateTimeFormat, cache.dateTime),
        getPluralRules: Object(intl_format_cache__WEBPACK_IMPORTED_MODULE_1__["default"])(Intl.PluralRules, cache.pluralRules),
    };
}
var IntlMessageFormat = /** @class */ (function () {
    function IntlMessageFormat(message, locales, overrideFormats, opts) {
        var _this = this;
        if (locales === void 0) { locales = IntlMessageFormat.defaultLocale; }
        this.formatterCache = {
            number: {},
            dateTime: {},
            pluralRules: {},
        };
        this.format = function (values) {
            return Object(_formatters__WEBPACK_IMPORTED_MODULE_2__["formatToString"])(_this.ast, _this.locale, _this.formatters, _this.formats, values, _this.message);
        };
        this.formatToParts = function (values) {
            return Object(_formatters__WEBPACK_IMPORTED_MODULE_2__["formatToParts"])(_this.ast, _this.locale, _this.formatters, _this.formats, values, _this.message);
        };
        this.formatXMLMessage = function (values) {
            return Object(_formatters__WEBPACK_IMPORTED_MODULE_2__["formatXMLMessage"])(_this.ast, _this.locale, _this.formatters, _this.formats, values, _this.message);
        };
        this.resolvedOptions = function () { return ({ locale: _this.locale }); };
        this.getAst = function () { return _this.ast; };
        if (typeof message === 'string') {
            this.message = message;
            if (!IntlMessageFormat.__parse) {
                throw new TypeError('IntlMessageFormat.__parse must be set to process `message` of type `string`');
            }
            // Parse string messages into an AST.
            this.ast = IntlMessageFormat.__parse(message);
        }
        else {
            this.ast = message;
        }
        if (!Array.isArray(this.ast)) {
            throw new TypeError('A message must be provided as a String or AST.');
        }
        // Creates a new object with the specified `formats` merged with the default
        // formats.
        this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);
        // Defined first because it's used to build the format pattern.
        this.locale = resolveLocale(locales || []);
        this.formatters =
            (opts && opts.formatters) || createDefaultFormatters(this.formatterCache);
        prewarmFormatters(this.ast, this.locale, this.formatters, this.formats);
    }
    IntlMessageFormat.defaultLocale = 'en';
    IntlMessageFormat.__parse = intl_messageformat_parser__WEBPACK_IMPORTED_MODULE_0__["parse"];
    // Default format options used as the prototype of the `formats` provided to the
    // constructor. These are used when constructing the internal Intl.NumberFormat
    // and Intl.DateTimeFormat instances.
    IntlMessageFormat.formats = {
        number: {
            currency: {
                style: 'currency',
            },
            percent: {
                style: 'percent',
            },
        },
        date: {
            short: {
                month: 'numeric',
                day: 'numeric',
                year: '2-digit',
            },
            medium: {
                month: 'short',
                day: 'numeric',
                year: 'numeric',
            },
            long: {
                month: 'long',
                day: 'numeric',
                year: 'numeric',
            },
            full: {
                weekday: 'long',
                month: 'long',
                day: 'numeric',
                year: 'numeric',
            },
        },
        time: {
            short: {
                hour: 'numeric',
                minute: 'numeric',
            },
            medium: {
                hour: 'numeric',
                minute: 'numeric',
                second: 'numeric',
            },
            long: {
                hour: 'numeric',
                minute: 'numeric',
                second: 'numeric',
                timeZoneName: 'short',
            },
            full: {
                hour: 'numeric',
                minute: 'numeric',
                second: 'numeric',
                timeZoneName: 'short',
            },
        },
    };
    return IntlMessageFormat;
}());

/* harmony default export */ __webpack_exports__["default"] = (IntlMessageFormat);


/***/ }),

/***/ "./node_modules/intl-messageformat/lib/formatters.js":
/*!***********************************************************!*\
  !*** ./node_modules/intl-messageformat/lib/formatters.js ***!
  \***********************************************************/
/*! exports provided: formatToParts, formatToString, formatXMLMessage */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatToParts", function() { return formatToParts; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatToString", function() { return formatToString; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatXMLMessage", function() { return formatXMLMessage; });
/* harmony import */ var intl_messageformat_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! intl-messageformat-parser */ "./node_modules/intl-messageformat-parser/lib/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();

var ESCAPE_HASH_REGEX = /\\#/g;
var FormatError = /** @class */ (function (_super) {
    __extends(FormatError, _super);
    function FormatError(msg, variableId) {
        var _this = _super.call(this, msg) || this;
        _this.variableId = variableId;
        return _this;
    }
    return FormatError;
}(Error));
function mergeLiteral(parts) {
    if (parts.length < 2) {
        return parts;
    }
    return parts.reduce(function (all, part) {
        var lastPart = all[all.length - 1];
        if (!lastPart ||
            lastPart.type !== 0 /* literal */ ||
            part.type !== 0 /* literal */) {
            all.push(part);
        }
        else {
            lastPart.value += part.value;
        }
        return all;
    }, []);
}
// TODO(skeleton): add skeleton support
function formatToParts(els, locales, formatters, formats, values, 
// For debugging
originalMessage) {
    // Hot path for straight simple msg translations
    if (els.length === 1 && Object(intl_messageformat_parser__WEBPACK_IMPORTED_MODULE_0__["isLiteralElement"])(els[0])) {
        return [
            {
                type: 0 /* literal */,
                value: els[0].value.replace(ESCAPE_HASH_REGEX, '#'),
            },
        ];
    }
    var result = [];
    for (var _i = 0, els_1 = els; _i < els_1.length; _i++) {
        var el = els_1[_i];
        // Exit early for string parts.
        if (Object(intl_messageformat_parser__WEBPACK_IMPORTED_MODULE_0__["isLiteralElement"])(el)) {
            result.push({
                type: 0 /* literal */,
                value: el.value.replace(ESCAPE_HASH_REGEX, '#'),
            });
            continue;
        }
        var varName = el.value;
        // Enforce that all required values are provided by the caller.
        if (!(values && varName in values)) {
            throw new FormatError("The intl string context variable \"" + varName + "\" was not provided to the string \"" + originalMessage + "\"");
        }
        var value = values[varName];
        if (Object(intl_messageformat_parser__WEBPACK_IMPORTED_MODULE_0__["isArgumentElement"])(el)) {
            if (!value || typeof value === 'string' || typeof value === 'number') {
                value =
                    typeof value === 'string' || typeof value === 'number'
                        ? String(value)
                        : '';
            }
            result.push({
                type: 1 /* argument */,
                value: value,
            });
            continue;
        }
        // Recursively format plural and select parts' option — which can be a
        // nested pattern structure. The choosing of the option to use is
        // abstracted-by and delegated-to the part helper object.
        if (Object(intl_messageformat_parser__WEBPACK_IMPORTED_MODULE_0__["isDateElement"])(el)) {
            var style = typeof el.style === 'string' ? formats.date[el.style] : undefined;
            result.push({
                type: 0 /* literal */,
                value: formatters
                    .getDateTimeFormat(locales, style)
                    .format(value),
            });
            continue;
        }
        if (Object(intl_messageformat_parser__WEBPACK_IMPORTED_MODULE_0__["isTimeElement"])(el)) {
            var style = typeof el.style === 'string' ? formats.time[el.style] : undefined;
            result.push({
                type: 0 /* literal */,
                value: formatters
                    .getDateTimeFormat(locales, style)
                    .format(value),
            });
            continue;
        }
        if (Object(intl_messageformat_parser__WEBPACK_IMPORTED_MODULE_0__["isNumberElement"])(el)) {
            var style = typeof el.style === 'string' ? formats.number[el.style] : undefined;
            result.push({
                type: 0 /* literal */,
                value: formatters
                    .getNumberFormat(locales, style)
                    .format(value),
            });
            continue;
        }
        if (Object(intl_messageformat_parser__WEBPACK_IMPORTED_MODULE_0__["isSelectElement"])(el)) {
            var opt = el.options[value] || el.options.other;
            if (!opt) {
                throw new RangeError("Invalid values for \"" + el.value + "\": \"" + value + "\". Options are \"" + Object.keys(el.options).join('", "') + "\"");
            }
            result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values));
            continue;
        }
        if (Object(intl_messageformat_parser__WEBPACK_IMPORTED_MODULE_0__["isPluralElement"])(el)) {
            var opt = el.options["=" + value];
            if (!opt) {
                var rule = formatters
                    .getPluralRules(locales, { type: el.pluralType })
                    .select(value - (el.offset || 0));
                opt = el.options[rule] || el.options.other;
            }
            if (!opt) {
                throw new RangeError("Invalid values for \"" + el.value + "\": \"" + value + "\". Options are \"" + Object.keys(el.options).join('", "') + "\"");
            }
            result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values));
            continue;
        }
    }
    return mergeLiteral(result);
}
function formatToString(els, locales, formatters, formats, values, 
// For debugging
originalMessage) {
    var parts = formatToParts(els, locales, formatters, formats, values, originalMessage);
    // Hot path for straight simple msg translations
    if (parts.length === 1) {
        return parts[0].value;
    }
    return parts.reduce(function (all, part) { return (all += part.value); }, '');
}
// Singleton
var domParser;
var TOKEN_DELIMITER = '@@';
var TOKEN_REGEX = /@@(.*?)@@/g;
var counter = 0;
function generateId() {
    return Date.now() + "_" + ++counter;
}
function restoreRichPlaceholderMessage(text, objectParts) {
    return text
        .split(TOKEN_REGEX)
        .filter(Boolean)
        .map(function (c) { return (objectParts[c] != null ? objectParts[c] : c); })
        .reduce(function (all, c) {
        if (!all.length) {
            all.push(c);
        }
        else if (typeof c === 'string' &&
            typeof all[all.length - 1] === 'string') {
            all[all.length - 1] += c;
        }
        else {
            all.push(c);
        }
        return all;
    }, []);
}
function formatXMLMessage(els, locales, formatters, formats, values, 
// For debugging
originalMessage) {
    var parts = formatToParts(els, locales, formatters, formats, values, originalMessage);
    var objectParts = {};
    var formattedMessage = parts.reduce(function (all, part) {
        if (part.type === 0 /* literal */) {
            return (all += part.value);
        }
        var id = generateId();
        objectParts[id] = part.value;
        return (all += "" + TOKEN_DELIMITER + id + TOKEN_DELIMITER);
    }, '');
    // Not designed to filter out aggressively
    if (!~formattedMessage.indexOf('<')) {
        return restoreRichPlaceholderMessage(formattedMessage, objectParts);
    }
    if (!values) {
        throw new FormatError('Message has placeholders but no values was given');
    }
    if (typeof DOMParser === 'undefined') {
        throw new FormatError('Cannot format XML message without DOMParser');
    }
    if (!domParser) {
        domParser = new DOMParser();
    }
    // XML, not HTML since HTMl is strict about self-closing tag
    var dom = domParser.parseFromString("<template>" + formattedMessage + "</template>", 'application/xml');
    if (dom.getElementsByTagName('parsererror').length) {
        throw new FormatError("Malformed XML message " + dom.getElementsByTagName('parsererror')[0].innerHTML);
    }
    var content = dom.firstChild;
    if (!content) {
        throw new FormatError("Malformed XML message " + formattedMessage);
    }
    var tagsToFormat = Object.keys(values).filter(function (varName) { return !!dom.getElementsByTagName(varName).length; });
    // No tags to format
    if (!tagsToFormat.length) {
        return restoreRichPlaceholderMessage(formattedMessage, objectParts);
    }
    var childNodes = Array.prototype.slice.call(content.childNodes);
    return childNodes.reduce(function (reconstructedChunks, _a) {
        var tagName = _a.tagName, outerHTML = _a.outerHTML, textContent = _a.textContent;
        // Regular text
        if (!tagName) {
            var chunks = restoreRichPlaceholderMessage(textContent || '', objectParts);
            return reconstructedChunks.concat(chunks);
        }
        // Legacy HTML
        if (!values[tagName]) {
            var chunks = restoreRichPlaceholderMessage(outerHTML, objectParts);
            if (chunks.length === 1) {
                return reconstructedChunks.concat([chunks[0]]);
            }
            return reconstructedChunks.concat(chunks);
        }
        // XML Tag replacement
        var formatFnOrValue = values[tagName];
        if (typeof formatFnOrValue === 'function') {
            if (textContent == null) {
                return reconstructedChunks.concat([
                    formatFnOrValue(textContent || undefined),
                ]);
            }
            var chunks = restoreRichPlaceholderMessage(textContent, objectParts);
            return reconstructedChunks.concat([formatFnOrValue.apply(void 0, chunks)]);
        }
        return reconstructedChunks.concat([formatFnOrValue]);
    }, []);
}


/***/ }),

/***/ "./node_modules/intl-messageformat/lib/index.js":
/*!******************************************************!*\
  !*** ./node_modules/intl-messageformat/lib/index.js ***!
  \******************************************************/
/*! exports provided: formatToParts, formatToString, formatXMLMessage, createDefaultFormatters, IntlMessageFormat, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core */ "./node_modules/intl-messageformat/lib/core.js");
/* harmony import */ var _formatters__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatters */ "./node_modules/intl-messageformat/lib/formatters.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatToParts", function() { return _formatters__WEBPACK_IMPORTED_MODULE_1__["formatToParts"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatToString", function() { return _formatters__WEBPACK_IMPORTED_MODULE_1__["formatToString"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatXMLMessage", function() { return _formatters__WEBPACK_IMPORTED_MODULE_1__["formatXMLMessage"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createDefaultFormatters", function() { return _core__WEBPACK_IMPORTED_MODULE_0__["createDefaultFormatters"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IntlMessageFormat", function() { return _core__WEBPACK_IMPORTED_MODULE_0__["IntlMessageFormat"]; });

/*
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
Copyrights licensed under the New BSD License.
See the accompanying LICENSE file for terms.
*/



/* harmony default export */ __webpack_exports__["default"] = (_core__WEBPACK_IMPORTED_MODULE_0__["default"]);


/***/ }),

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

"use strict";
/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */



/**
 * Use invariant() to assert state which your program assumes to be true.
 *
 * Provide sprintf-style format (only %s is supported) and arguments
 * to provide information about what broke and what you were
 * expecting.
 *
 * The invariant message will be stripped in production, but the invariant
 * will remain to ensure logic does not differ in production.
 */

var invariant = function(condition, format, a, b, c, d, e, f) {
  if (true) {
    if (format === undefined) {
      throw new Error('invariant requires an error message argument');
    }
  }

  if (!condition) {
    var error;
    if (format === undefined) {
      error = new Error(
        'Minified exception occurred; use the non-minified dev environment ' +
        'for the full error message and additional helpful warnings.'
      );
    } else {
      var args = [a, b, c, d, e, f];
      var argIndex = 0;
      error = new Error(
        format.replace(/%s/g, function() { return args[argIndex++]; })
      );
      error.name = 'Invariant Violation';
    }

    error.framesToPop = 1; // we don't care about invariant's own frame
    throw error;
  }
};

module.exports = invariant;


/***/ }),

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

"use strict";


/*
 * OBJECT ASSIGN DEEP
 * Allows deep cloning of plain objects that contain primitives, nested plain objects, or nested plain arrays.
 */

/*
 * A unified way of returning a string that describes the type of the given variable.
 */
function getTypeOf (input) {

	if (input === null) {
		return 'null';
	}

	else if (typeof input === 'undefined') {
		return 'undefined';
	}

	else if (typeof input === 'object') {
		return (Array.isArray(input) ? 'array' : 'object');
	}

	return typeof input;

}

/*
 * Branching logic which calls the correct function to clone the given value base on its type.
 */
function cloneValue (value) {

	// The value is an object so lets clone it.
	if (getTypeOf(value) === 'object') {
		return quickCloneObject(value);
	}

	// The value is an array so lets clone it.
	else if (getTypeOf(value) === 'array') {
		return quickCloneArray(value);
	}

	// Any other value can just be copied.
	return value;

}

/*
 * Enumerates the given array and returns a new array, with each of its values cloned (i.e. references broken).
 */
function quickCloneArray (input) {
	return input.map(cloneValue);
}

/*
 * Enumerates the properties of the given object (ignoring the prototype chain) and returns a new object, with each of
 * its values cloned (i.e. references broken).
 */
function quickCloneObject (input) {

	const output = {};

	for (const key in input) {
		if (!input.hasOwnProperty(key)) { continue; }

		output[key] = cloneValue(input[key]);
	}

	return output;

}

/*
 * Does the actual deep merging.
 */
function executeDeepMerge (target, _objects = [], _options = {}) {

	const options = {
		arrayBehaviour: _options.arrayBehaviour || 'replace',  // Can be "merge" or "replace".
	};

	// Ensure we have actual objects for each.
	const objects = _objects.map(object => object || {});
	const output = target || {};

	// Enumerate the objects and their keys.
	for (let oindex = 0; oindex < objects.length; oindex++) {
		const object = objects[oindex];
		const keys = Object.keys(object);

		for (let kindex = 0; kindex < keys.length; kindex++) {
			const key = keys[kindex];
			const value = object[key];
			const type = getTypeOf(value);
			const existingValueType = getTypeOf(output[key]);

			if (type === 'object') {
				if (existingValueType !== 'undefined') {
					const existingValue = (existingValueType === 'object' ? output[key] : {});
					output[key] = executeDeepMerge({}, [existingValue, quickCloneObject(value)], options);
				}
				else {
					output[key] = quickCloneObject(value);
				}
			}

			else if (type === 'array') {
				if (existingValueType === 'array') {
					const newValue = quickCloneArray(value);
					output[key] = (options.arrayBehaviour === 'merge' ? output[key].concat(newValue) : newValue);
				}
				else {
					output[key] = quickCloneArray(value);
				}
			}

			else {
				output[key] = value;
			}

		}
	}

	return output;

}

/*
 * Merge all the supplied objects into the target object, breaking all references, including those of nested objects
 * and arrays, and even objects nested inside arrays. The first parameter is not mutated unlike Object.assign().
 * Properties in later objects will always overwrite.
 */
module.exports = function objectAssignDeep (target, ...objects) {
	return executeDeepMerge(target, objects);
};

/*
 * Same as objectAssignDeep() except it doesn't mutate the target object and returns an entirely new object.
 */
module.exports.noMutate = function objectAssignDeepInto (...objects) {
	return executeDeepMerge({}, objects);
};

/*
 * Allows an options object to be passed in to customise the behaviour of the function.
 */
module.exports.withOptions = function objectAssignDeepInto (target, objects, options) {
	return executeDeepMerge(target, objects, options);
};


/***/ }),

/***/ "./node_modules/re-resizable/lib/index.js":
/*!************************************************!*\
  !*** ./node_modules/re-resizable/lib/index.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var React = __importStar(__webpack_require__(/*! react */ "react"));
var resizer_1 = __webpack_require__(/*! ./resizer */ "./node_modules/re-resizable/lib/resizer.js");
var fast_memoize_1 = __importDefault(__webpack_require__(/*! fast-memoize */ "./node_modules/fast-memoize/src/index.js"));
var DEFAULT_SIZE = {
    width: 'auto',
    height: 'auto',
};
var clamp = fast_memoize_1.default(function (n, min, max) { return Math.max(Math.min(n, max), min); });
var snap = fast_memoize_1.default(function (n, size) { return Math.round(n / size) * size; });
var hasDirection = fast_memoize_1.default(function (dir, target) { return new RegExp(dir, 'i').test(target); });
var findClosestSnap = fast_memoize_1.default(function (n, snapArray, snapGap) {
    if (snapGap === void 0) { snapGap = 0; }
    var closestGapIndex = snapArray.reduce(function (prev, curr, index) { return (Math.abs(curr - n) < Math.abs(snapArray[prev] - n) ? index : prev); }, 0);
    var gap = Math.abs(snapArray[closestGapIndex] - n);
    return snapGap === 0 || gap < snapGap ? snapArray[closestGapIndex] : n;
});
var endsWith = fast_memoize_1.default(function (str, searchStr) {
    return str.substr(str.length - searchStr.length, searchStr.length) === searchStr;
});
var getStringSize = fast_memoize_1.default(function (n) {
    n = n.toString();
    if (n === 'auto') {
        return n;
    }
    if (endsWith(n, 'px')) {
        return n;
    }
    if (endsWith(n, '%')) {
        return n;
    }
    if (endsWith(n, 'vh')) {
        return n;
    }
    if (endsWith(n, 'vw')) {
        return n;
    }
    if (endsWith(n, 'vmax')) {
        return n;
    }
    if (endsWith(n, 'vmin')) {
        return n;
    }
    return n + "px";
});
var calculateNewMax = fast_memoize_1.default(function (parentSize, maxWidth, maxHeight, minWidth, minHeight) {
    if (maxWidth && typeof maxWidth === 'string' && endsWith(maxWidth, '%')) {
        var ratio = Number(maxWidth.replace('%', '')) / 100;
        maxWidth = parentSize.width * ratio;
    }
    if (maxHeight && typeof maxHeight === 'string' && endsWith(maxHeight, '%')) {
        var ratio = Number(maxHeight.replace('%', '')) / 100;
        maxHeight = parentSize.height * ratio;
    }
    if (minWidth && typeof minWidth === 'string' && endsWith(minWidth, '%')) {
        var ratio = Number(minWidth.replace('%', '')) / 100;
        minWidth = parentSize.width * ratio;
    }
    if (minHeight && typeof minHeight === 'string' && endsWith(minHeight, '%')) {
        var ratio = Number(minHeight.replace('%', '')) / 100;
        minHeight = parentSize.height * ratio;
    }
    return {
        maxWidth: typeof maxWidth === 'undefined' ? undefined : Number(maxWidth),
        maxHeight: typeof maxHeight === 'undefined' ? undefined : Number(maxHeight),
        minWidth: typeof minWidth === 'undefined' ? undefined : Number(minWidth),
        minHeight: typeof minHeight === 'undefined' ? undefined : Number(minHeight),
    };
});
var definedProps = [
    'style',
    'className',
    'grid',
    'snap',
    'bounds',
    'size',
    'defaultSize',
    'minWidth',
    'minHeight',
    'maxWidth',
    'maxHeight',
    'lockAspectRatio',
    'lockAspectRatioExtraWidth',
    'lockAspectRatioExtraHeight',
    'enable',
    'handleStyles',
    'handleClasses',
    'handleWrapperStyle',
    'handleWrapperClass',
    'children',
    'onResizeStart',
    'onResize',
    'onResizeStop',
    'handleComponent',
    'scale',
    'resizeRatio',
    'snapGap',
];
// HACK: This class is used to calculate % size.
var baseClassName = '__resizable_base__';
var Resizable = /** @class */ (function (_super) {
    __extends(Resizable, _super);
    function Resizable(props) {
        var _this = _super.call(this, props) || this;
        _this.ratio = 1;
        _this.resizable = null;
        _this.extendsProps = {};
        // For parent boundary
        _this.parentLeft = 0;
        _this.parentTop = 0;
        // For boundary
        _this.resizableLeft = 0;
        _this.resizableTop = 0;
        // For target boundary
        _this.targetLeft = 0;
        _this.targetTop = 0;
        _this.state = {
            isResizing: false,
            resizeCursor: 'auto',
            width: typeof (_this.propsSize && _this.propsSize.width) === 'undefined'
                ? 'auto'
                : _this.propsSize && _this.propsSize.width,
            height: typeof (_this.propsSize && _this.propsSize.height) === 'undefined'
                ? 'auto'
                : _this.propsSize && _this.propsSize.height,
            direction: 'right',
            original: {
                x: 0,
                y: 0,
                width: 0,
                height: 0,
            },
        };
        _this.updateExtendsProps(props);
        _this.onResizeStart = _this.onResizeStart.bind(_this);
        _this.onMouseMove = _this.onMouseMove.bind(_this);
        _this.onMouseUp = _this.onMouseUp.bind(_this);
        if (typeof window !== 'undefined') {
            window.addEventListener('mouseup', _this.onMouseUp);
            window.addEventListener('mousemove', _this.onMouseMove);
            window.addEventListener('mouseleave', _this.onMouseUp);
            window.addEventListener('touchmove', _this.onMouseMove);
            window.addEventListener('touchend', _this.onMouseUp);
        }
        return _this;
    }
    Object.defineProperty(Resizable.prototype, "parentNode", {
        get: function () {
            if (!this.resizable) {
                return null;
            }
            return this.resizable.parentNode;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Resizable.prototype, "propsSize", {
        get: function () {
            return this.props.size || this.props.defaultSize || DEFAULT_SIZE;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Resizable.prototype, "base", {
        get: function () {
            var parent = this.parentNode;
            if (!parent) {
                return undefined;
            }
            var children = [].slice.call(parent.children);
            for (var _i = 0, children_1 = children; _i < children_1.length; _i++) {
                var n = children_1[_i];
                if (n instanceof HTMLElement) {
                    if (n.classList.contains(baseClassName)) {
                        return n;
                    }
                }
            }
            return undefined;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Resizable.prototype, "size", {
        get: function () {
            var width = 0;
            var height = 0;
            if (typeof window !== 'undefined' && this.resizable) {
                var orgWidth = this.resizable.offsetWidth;
                var orgHeight = this.resizable.offsetHeight;
                // HACK: Set position `relative` to get parent size.
                //       This is because when re-resizable set `absolute`, I can not get base width correctly.
                var orgPosition = this.resizable.style.position;
                if (orgPosition !== 'relative') {
                    this.resizable.style.position = 'relative';
                }
                // INFO: Use original width or height if set auto.
                width = this.resizable.style.width !== 'auto' ? this.resizable.offsetWidth : orgWidth;
                height = this.resizable.style.height !== 'auto' ? this.resizable.offsetHeight : orgHeight;
                // Restore original position
                this.resizable.style.position = orgPosition;
            }
            return { width: width, height: height };
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Resizable.prototype, "sizeStyle", {
        get: function () {
            var _this = this;
            var size = this.props.size;
            var getSize = function (key) {
                if (typeof _this.state[key] === 'undefined' || _this.state[key] === 'auto') {
                    return 'auto';
                }
                if (_this.propsSize && _this.propsSize[key] && endsWith(_this.propsSize[key].toString(), '%')) {
                    if (endsWith(_this.state[key].toString(), '%')) {
                        return _this.state[key].toString();
                    }
                    var parentSize = _this.getParentSize();
                    var value = Number(_this.state[key].toString().replace('px', ''));
                    var percent = (value / parentSize[key]) * 100;
                    return percent + "%";
                }
                return getStringSize(_this.state[key]);
            };
            var width = size && typeof size.width !== 'undefined' && !this.state.isResizing
                ? getStringSize(size.width)
                : getSize('width');
            var height = size && typeof size.height !== 'undefined' && !this.state.isResizing
                ? getStringSize(size.height)
                : getSize('height');
            return { width: width, height: height };
        },
        enumerable: true,
        configurable: true
    });
    Resizable.prototype.updateExtendsProps = function (props) {
        this.extendsProps = Object.keys(props).reduce(function (acc, key) {
            if (definedProps.indexOf(key) !== -1) {
                return acc;
            }
            acc[key] = props[key];
            return acc;
        }, {});
    };
    Resizable.prototype.getParentSize = function () {
        if (!this.base || !this.parentNode) {
            return { width: window.innerWidth, height: window.innerHeight };
        }
        // INFO: To calculate parent width with flex layout
        var wrapChanged = false;
        var wrap = this.parentNode.style.flexWrap;
        var minWidth = this.base.style.minWidth;
        if (wrap !== 'wrap') {
            wrapChanged = true;
            this.parentNode.style.flexWrap = 'wrap';
            // HACK: Use relative to get parent padding size
        }
        this.base.style.position = 'relative';
        this.base.style.minWidth = '100%';
        var size = {
            width: this.base.offsetWidth,
            height: this.base.offsetHeight,
        };
        this.base.style.position = 'absolute';
        if (wrapChanged) {
            this.parentNode.style.flexWrap = wrap;
        }
        this.base.style.minWidth = minWidth;
        return size;
    };
    Resizable.prototype.componentDidMount = function () {
        this.setState({
            width: this.state.width || this.size.width,
            height: this.state.height || this.size.height,
        });
        var parent = this.parentNode;
        if (!(parent instanceof HTMLElement)) {
            return;
        }
        if (this.base) {
            return;
        }
        var element = document.createElement('div');
        element.style.width = '100%';
        element.style.height = '100%';
        element.style.position = 'absolute';
        element.style.transform = 'scale(0, 0)';
        element.style.left = '0';
        element.style.flex = '0';
        if (element.classList) {
            element.classList.add(baseClassName);
        }
        else {
            element.className += baseClassName;
        }
        parent.appendChild(element);
    };
    Resizable.prototype.componentWillReceiveProps = function (next) {
        this.updateExtendsProps(next);
    };
    Resizable.prototype.componentWillUnmount = function () {
        if (typeof window !== 'undefined') {
            window.removeEventListener('mouseup', this.onMouseUp);
            window.removeEventListener('mousemove', this.onMouseMove);
            window.removeEventListener('mouseleave', this.onMouseUp);
            window.removeEventListener('touchmove', this.onMouseMove);
            window.removeEventListener('touchend', this.onMouseUp);
            var parent_1 = this.parentNode;
            if (!this.base || !parent_1) {
                return;
            }
            if (!(parent_1 instanceof HTMLElement) || !(this.base instanceof Node)) {
                return;
            }
            parent_1.removeChild(this.base);
        }
    };
    Resizable.prototype.createSizeForCssProperty = function (newSize, kind) {
        var propsSize = this.propsSize && this.propsSize[kind];
        return this.state[kind] === 'auto' &&
            this.state.original[kind] === newSize &&
            (typeof propsSize === 'undefined' || propsSize === 'auto')
            ? 'auto'
            : newSize;
    };
    Resizable.prototype.calculateNewMaxFromBoundary = function (maxWidth, maxHeight) {
        if (this.props.bounds === 'parent') {
            var parent_2 = this.parentNode;
            if (parent_2 instanceof HTMLElement) {
                var boundWidth = parent_2.offsetWidth + (this.parentLeft - this.resizableLeft);
                var boundHeight = parent_2.offsetHeight + (this.parentTop - this.resizableTop);
                maxWidth = maxWidth && maxWidth < boundWidth ? maxWidth : boundWidth;
                maxHeight = maxHeight && maxHeight < boundHeight ? maxHeight : boundHeight;
            }
        }
        else if (this.props.bounds === 'window') {
            if (typeof window !== 'undefined') {
                var boundWidth = window.innerWidth - this.resizableLeft;
                var boundHeight = window.innerHeight - this.resizableTop;
                maxWidth = maxWidth && maxWidth < boundWidth ? maxWidth : boundWidth;
                maxHeight = maxHeight && maxHeight < boundHeight ? maxHeight : boundHeight;
            }
        }
        else if (this.props.bounds instanceof HTMLElement) {
            var boundWidth = this.props.bounds.offsetWidth + (this.targetLeft - this.resizableLeft);
            var boundHeight = this.props.bounds.offsetHeight + (this.targetTop - this.resizableTop);
            maxWidth = maxWidth && maxWidth < boundWidth ? maxWidth : boundWidth;
            maxHeight = maxHeight && maxHeight < boundHeight ? maxHeight : boundHeight;
        }
        return { maxWidth: maxWidth, maxHeight: maxHeight };
    };
    Resizable.prototype.calculateNewSizeFromDirection = function (clientX, clientY) {
        var scale = this.props.scale || 1;
        var resizeRatio = this.props.resizeRatio || 1;
        var _a = this.state, direction = _a.direction, original = _a.original;
        var _b = this.props, lockAspectRatio = _b.lockAspectRatio, lockAspectRatioExtraHeight = _b.lockAspectRatioExtraHeight, lockAspectRatioExtraWidth = _b.lockAspectRatioExtraWidth;
        var newWidth = original.width;
        var newHeight = original.height;
        var extraHeight = lockAspectRatioExtraHeight || 0;
        var extraWidth = lockAspectRatioExtraWidth || 0;
        if (hasDirection('right', direction)) {
            newWidth = original.width + ((clientX - original.x) * resizeRatio) / scale;
            if (lockAspectRatio) {
                newHeight = (newWidth - extraWidth) / this.ratio + extraHeight;
            }
        }
        if (hasDirection('left', direction)) {
            newWidth = original.width - ((clientX - original.x) * resizeRatio) / scale;
            if (lockAspectRatio) {
                newHeight = (newWidth - extraWidth) / this.ratio + extraHeight;
            }
        }
        if (hasDirection('bottom', direction)) {
            newHeight = original.height + ((clientY - original.y) * resizeRatio) / scale;
            if (lockAspectRatio) {
                newWidth = (newHeight - extraHeight) * this.ratio + extraWidth;
            }
        }
        if (hasDirection('top', direction)) {
            newHeight = original.height - ((clientY - original.y) * resizeRatio) / scale;
            if (lockAspectRatio) {
                newWidth = (newHeight - extraHeight) * this.ratio + extraWidth;
            }
        }
        return { newWidth: newWidth, newHeight: newHeight };
    };
    Resizable.prototype.calculateNewSizeFromAspectRatio = function (newWidth, newHeight, max, min) {
        var _a = this.props, lockAspectRatio = _a.lockAspectRatio, lockAspectRatioExtraHeight = _a.lockAspectRatioExtraHeight, lockAspectRatioExtraWidth = _a.lockAspectRatioExtraWidth;
        var computedMinWidth = typeof min.width === 'undefined' ? 10 : min.width;
        var computedMaxWidth = typeof max.width === 'undefined' || max.width < 0 ? newWidth : max.width;
        var computedMinHeight = typeof min.height === 'undefined' ? 10 : min.height;
        var computedMaxHeight = typeof max.height === 'undefined' || max.height < 0 ? newHeight : max.height;
        var extraHeight = lockAspectRatioExtraHeight || 0;
        var extraWidth = lockAspectRatioExtraWidth || 0;
        if (lockAspectRatio) {
            var extraMinWidth = (computedMinHeight - extraHeight) * this.ratio + extraWidth;
            var extraMaxWidth = (computedMaxHeight - extraHeight) * this.ratio + extraWidth;
            var extraMinHeight = (computedMinWidth - extraWidth) / this.ratio + extraHeight;
            var extraMaxHeight = (computedMaxWidth - extraWidth) / this.ratio + extraHeight;
            var lockedMinWidth = Math.max(computedMinWidth, extraMinWidth);
            var lockedMaxWidth = Math.min(computedMaxWidth, extraMaxWidth);
            var lockedMinHeight = Math.max(computedMinHeight, extraMinHeight);
            var lockedMaxHeight = Math.min(computedMaxHeight, extraMaxHeight);
            newWidth = clamp(newWidth, lockedMinWidth, lockedMaxWidth);
            newHeight = clamp(newHeight, lockedMinHeight, lockedMaxHeight);
        }
        else {
            newWidth = clamp(newWidth, computedMinWidth, computedMaxWidth);
            newHeight = clamp(newHeight, computedMinHeight, computedMaxHeight);
        }
        return { newWidth: newWidth, newHeight: newHeight };
    };
    Resizable.prototype.setBoundingClientRect = function () {
        // For parent boundary
        if (this.props.bounds === 'parent') {
            var parent_3 = this.parentNode;
            if (parent_3 instanceof HTMLElement) {
                var parentRect = parent_3.getBoundingClientRect();
                this.parentLeft = parentRect.left;
                this.parentTop = parentRect.top;
            }
        }
        // For target(html element) boundary
        if (this.props.bounds instanceof HTMLElement) {
            var targetRect = this.props.bounds.getBoundingClientRect();
            this.targetLeft = targetRect.left;
            this.targetTop = targetRect.top;
        }
        // For boundary
        if (this.resizable) {
            var _a = this.resizable.getBoundingClientRect(), left = _a.left, top_1 = _a.top;
            this.resizableLeft = left;
            this.resizableTop = top_1;
        }
    };
    Resizable.prototype.onResizeStart = function (event, direction) {
        var clientX = 0;
        var clientY = 0;
        if (event.nativeEvent instanceof MouseEvent) {
            clientX = event.nativeEvent.clientX;
            clientY = event.nativeEvent.clientY;
            // When user click with right button the resize is stuck in resizing mode
            // until users clicks again, dont continue if right click is used.
            // HACK: MouseEvent does not have `which` from flow-bin v0.68.
            if (event.nativeEvent.which === 3) {
                return;
            }
        }
        else if (event.nativeEvent instanceof TouchEvent) {
            clientX = event.nativeEvent.touches[0].clientX;
            clientY = event.nativeEvent.touches[0].clientY;
        }
        if (this.props.onResizeStart) {
            if (this.resizable) {
                this.props.onResizeStart(event, direction, this.resizable);
            }
        }
        // Fix #168
        if (this.props.size) {
            if (typeof this.props.size.height !== 'undefined' && this.props.size.height !== this.state.height) {
                this.setState({ height: this.props.size.height });
            }
            if (typeof this.props.size.width !== 'undefined' && this.props.size.width !== this.state.width) {
                this.setState({ width: this.props.size.width });
            }
        }
        // For lockAspectRatio case
        this.ratio =
            typeof this.props.lockAspectRatio === 'number' ? this.props.lockAspectRatio : this.size.width / this.size.height;
        // For boundary
        this.setBoundingClientRect();
        this.setState({
            original: {
                x: clientX,
                y: clientY,
                width: this.size.width,
                height: this.size.height,
            },
            isResizing: true,
            resizeCursor: window.getComputedStyle(event.target).cursor || 'auto',
            direction: direction,
        });
    };
    Resizable.prototype.onMouseMove = function (event) {
        if (!this.state.isResizing || !this.resizable) {
            return;
        }
        var _a = this.props, maxWidth = _a.maxWidth, maxHeight = _a.maxHeight, minWidth = _a.minWidth, minHeight = _a.minHeight;
        var clientX = event instanceof MouseEvent ? event.clientX : event.touches[0].clientX;
        var clientY = event instanceof MouseEvent ? event.clientY : event.touches[0].clientY;
        var _b = this.state, direction = _b.direction, original = _b.original, width = _b.width, height = _b.height;
        var parentSize = this.getParentSize();
        var max = calculateNewMax(parentSize, maxWidth, maxHeight, minWidth, minHeight);
        maxWidth = max.maxWidth;
        maxHeight = max.maxHeight;
        minWidth = max.minWidth;
        minHeight = max.minHeight;
        // Calculate new size
        var _c = this.calculateNewSizeFromDirection(clientX, clientY), newHeight = _c.newHeight, newWidth = _c.newWidth;
        // Calculate max size from boundary settings
        var boundaryMax = this.calculateNewMaxFromBoundary(maxWidth, maxHeight);
        // Calculate new size from aspect ratio
        var newSize = this.calculateNewSizeFromAspectRatio(newWidth, newHeight, { width: boundaryMax.maxWidth, height: boundaryMax.maxHeight }, { width: minWidth, height: minHeight });
        newWidth = newSize.newWidth;
        newHeight = newSize.newHeight;
        if (this.props.grid) {
            var newGridWidth = snap(newWidth, this.props.grid[0]);
            var newGridHeight = snap(newHeight, this.props.grid[1]);
            var gap = this.props.snapGap || 0;
            newWidth = gap === 0 || Math.abs(newGridWidth - newWidth) <= gap ? newGridWidth : newWidth;
            newHeight = gap === 0 || Math.abs(newGridHeight - newHeight) <= gap ? newGridHeight : newHeight;
        }
        if (this.props.snap && this.props.snap.x) {
            newWidth = findClosestSnap(newWidth, this.props.snap.x, this.props.snapGap);
        }
        if (this.props.snap && this.props.snap.y) {
            newHeight = findClosestSnap(newHeight, this.props.snap.y, this.props.snapGap);
        }
        var delta = {
            width: newWidth - original.width,
            height: newHeight - original.height,
        };
        if (width && typeof width === 'string') {
            if (endsWith(width, '%')) {
                var percent = (newWidth / parentSize.width) * 100;
                newWidth = percent + "%";
            }
            else if (endsWith(width, 'vw')) {
                var vw = (newWidth / window.innerWidth) * 100;
                newWidth = vw + "vw";
            }
            else if (endsWith(width, 'vh')) {
                var vh = (newWidth / window.innerHeight) * 100;
                newWidth = vh + "vh";
            }
        }
        if (height && typeof height === 'string') {
            if (endsWith(height, '%')) {
                var percent = (newHeight / parentSize.height) * 100;
                newHeight = percent + "%";
            }
            else if (endsWith(height, 'vw')) {
                var vw = (newHeight / window.innerWidth) * 100;
                newHeight = vw + "vw";
            }
            else if (endsWith(height, 'vh')) {
                var vh = (newHeight / window.innerHeight) * 100;
                newHeight = vh + "vh";
            }
        }
        this.setState({
            width: this.createSizeForCssProperty(newWidth, 'width'),
            height: this.createSizeForCssProperty(newHeight, 'height'),
        });
        if (this.props.onResize) {
            this.props.onResize(event, direction, this.resizable, delta);
        }
    };
    Resizable.prototype.onMouseUp = function (event) {
        var _a = this.state, isResizing = _a.isResizing, direction = _a.direction, original = _a.original;
        if (!isResizing || !this.resizable) {
            return;
        }
        var delta = {
            width: this.size.width - original.width,
            height: this.size.height - original.height,
        };
        if (this.props.onResizeStop) {
            this.props.onResizeStop(event, direction, this.resizable, delta);
        }
        if (this.props.size) {
            this.setState(this.props.size);
        }
        this.setState({ isResizing: false, resizeCursor: 'auto' });
    };
    Resizable.prototype.updateSize = function (size) {
        this.setState({ width: size.width, height: size.height });
    };
    Resizable.prototype.renderResizer = function () {
        var _this = this;
        var _a = this.props, enable = _a.enable, handleStyles = _a.handleStyles, handleClasses = _a.handleClasses, handleWrapperStyle = _a.handleWrapperStyle, handleWrapperClass = _a.handleWrapperClass, handleComponent = _a.handleComponent;
        if (!enable) {
            return null;
        }
        var resizers = Object.keys(enable).map(function (dir) {
            if (enable[dir] !== false) {
                return (React.createElement(resizer_1.Resizer, { key: dir, direction: dir, onResizeStart: _this.onResizeStart, replaceStyles: handleStyles && handleStyles[dir], className: handleClasses && handleClasses[dir] }, handleComponent && handleComponent[dir] ? handleComponent[dir] : null));
            }
            return null;
        });
        // #93 Wrap the resize box in span (will not break 100% width/height)
        return (React.createElement("span", { className: handleWrapperClass, style: handleWrapperStyle }, resizers));
    };
    Resizable.prototype.render = function () {
        var _this = this;
        return (React.createElement("div", __assign({ ref: function (c) {
                if (c) {
                    _this.resizable = c;
                }
            }, style: __assign({ position: 'relative', userSelect: this.state.isResizing ? 'none' : 'auto' }, this.props.style, this.sizeStyle, { maxWidth: this.props.maxWidth, maxHeight: this.props.maxHeight, minWidth: this.props.minWidth, minHeight: this.props.minHeight, boxSizing: 'border-box' }), className: this.props.className }, this.extendsProps),
            this.state.isResizing && (React.createElement("div", { style: {
                    height: '100%',
                    width: '100%',
                    backgroundColor: 'rgba(0,0,0,0)',
                    cursor: "" + (this.state.resizeCursor || 'auto'),
                    opacity: 0,
                    position: 'fixed',
                    zIndex: 9999,
                    top: '0',
                    left: '0',
                    bottom: '0',
                    right: '0',
                } })),
            this.props.children,
            this.renderResizer()));
    };
    Resizable.defaultProps = {
        onResizeStart: function () { },
        onResize: function () { },
        onResizeStop: function () { },
        enable: {
            top: true,
            right: true,
            bottom: true,
            left: true,
            topRight: true,
            bottomRight: true,
            bottomLeft: true,
            topLeft: true,
        },
        style: {},
        grid: [1, 1],
        lockAspectRatio: false,
        lockAspectRatioExtraWidth: 0,
        lockAspectRatioExtraHeight: 0,
        scale: 1,
        resizeRatio: 1,
        snapGap: 0,
    };
    return Resizable;
}(React.Component));
exports.Resizable = Resizable;


/***/ }),

/***/ "./node_modules/re-resizable/lib/resizer.js":
/*!**************************************************!*\
  !*** ./node_modules/re-resizable/lib/resizer.js ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var React = __importStar(__webpack_require__(/*! react */ "react"));
var styles = {
    top: {
        width: '100%',
        height: '10px',
        top: '-5px',
        left: '0px',
        cursor: 'row-resize',
    },
    right: {
        width: '10px',
        height: '100%',
        top: '0px',
        right: '-5px',
        cursor: 'col-resize',
    },
    bottom: {
        width: '100%',
        height: '10px',
        bottom: '-5px',
        left: '0px',
        cursor: 'row-resize',
    },
    left: {
        width: '10px',
        height: '100%',
        top: '0px',
        left: '-5px',
        cursor: 'col-resize',
    },
    topRight: {
        width: '20px',
        height: '20px',
        position: 'absolute',
        right: '-10px',
        top: '-10px',
        cursor: 'ne-resize',
    },
    bottomRight: {
        width: '20px',
        height: '20px',
        position: 'absolute',
        right: '-10px',
        bottom: '-10px',
        cursor: 'se-resize',
    },
    bottomLeft: {
        width: '20px',
        height: '20px',
        position: 'absolute',
        left: '-10px',
        bottom: '-10px',
        cursor: 'sw-resize',
    },
    topLeft: {
        width: '20px',
        height: '20px',
        position: 'absolute',
        left: '-10px',
        top: '-10px',
        cursor: 'nw-resize',
    },
};
function Resizer(props) {
    return (React.createElement("div", { className: props.className || '', style: __assign({ position: 'absolute', userSelect: 'none' }, styles[props.direction], (props.replaceStyles || {})), onMouseDown: function (e) {
            props.onResizeStart(e, props.direction);
        }, onTouchStart: function (e) {
            props.onResizeStart(e, props.direction);
        } }, props.children));
}
exports.Resizer = Resizer;


/***/ }),

/***/ "./node_modules/react-intl/lib/components/createFormattedComponent.js":
/*!****************************************************************************!*\
  !*** ./node_modules/react-intl/lib/components/createFormattedComponent.js ***!
  \****************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createFormattedComponent; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "./node_modules/react-intl/lib/utils.js");
/* harmony import */ var _injectIntl__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./injectIntl */ "./node_modules/react-intl/lib/components/injectIntl.js");



var DisplayName;
(function (DisplayName) {
    DisplayName["formatDate"] = "FormattedDate";
    DisplayName["formatTime"] = "FormattedTime";
    DisplayName["formatNumber"] = "FormattedNumber";
})(DisplayName || (DisplayName = {}));
function createFormattedComponent(name) {
    const Component = props => (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_injectIntl__WEBPACK_IMPORTED_MODULE_2__["Context"].Consumer, null, intl => {
        Object(_utils__WEBPACK_IMPORTED_MODULE_1__["invariantIntlContext"])(intl);
        const formattedValue = intl[name](props.value, props);
        if (typeof props.children === 'function') {
            return props.children(formattedValue);
        }
        const Text = intl.textComponent || react__WEBPACK_IMPORTED_MODULE_0__["Fragment"];
        return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](Text, null, formattedValue);
    }));
    Component.displayName = DisplayName[name];
    return Component;
}


/***/ }),

/***/ "./node_modules/react-intl/lib/components/html-message.js":
/*!****************************************************************!*\
  !*** ./node_modules/react-intl/lib/components/html-message.js ***!
  \****************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _message__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./message */ "./node_modules/react-intl/lib/components/message.js");
/* harmony import */ var _injectIntl__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./injectIntl */ "./node_modules/react-intl/lib/components/injectIntl.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ "./node_modules/react-intl/lib/utils.js");
/*
 * Copyright 2015, Yahoo Inc.
 * Copyrights licensed under the New BSD License.
 * See the accompanying LICENSE file for terms.
 */




class FormattedHTMLMessage extends _message__WEBPACK_IMPORTED_MODULE_1__["default"] {
    render() {
        return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_injectIntl__WEBPACK_IMPORTED_MODULE_2__["Context"].Consumer, null, intl => {
            if (!this.props.defaultMessage) {
                Object(_utils__WEBPACK_IMPORTED_MODULE_3__["invariantIntlContext"])(intl);
            }
            const { formatHTMLMessage, textComponent: Text } = intl;
            const { id, description, defaultMessage, values: rawValues, 
            // This is bc of TS3.3 doesn't recognize `defaultProps`
            tagName: Component = Text || 'span', children, } = this.props;
            let descriptor = { id, description, defaultMessage };
            let formattedHTMLMessage = formatHTMLMessage(descriptor, rawValues);
            if (typeof children === 'function') {
                return children(formattedHTMLMessage);
            }
            // Since the message presumably has HTML in it, we need to set
            // `innerHTML` in order for it to be rendered and not escaped by React.
            // To be safe, all string prop values were escaped when formatting the
            // message. It is assumed that the message is not UGC, and came from the
            // developer making it more like a template.
            //
            // Note: There's a perf impact of using this component since there's no
            // way for React to do its virtual DOM diffing.
            const html = { __html: formattedHTMLMessage };
            return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](Component, { dangerouslySetInnerHTML: html });
        }));
    }
}
FormattedHTMLMessage.displayName = 'FormattedHTMLMessage';
FormattedHTMLMessage.defaultProps = Object.assign({}, _message__WEBPACK_IMPORTED_MODULE_1__["default"].defaultProps, { tagName: 'span' });
/* harmony default export */ __webpack_exports__["default"] = (FormattedHTMLMessage);


/***/ }),

/***/ "./node_modules/react-intl/lib/components/injectIntl.js":
/*!**************************************************************!*\
  !*** ./node_modules/react-intl/lib/components/injectIntl.js ***!
  \**************************************************************/
/*! exports provided: Provider, Context, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Provider", function() { return Provider; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Context", function() { return Context; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return injectIntl; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! hoist-non-react-statics */ "./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js");
/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "./node_modules/react-intl/lib/utils.js");


// Since rollup cannot deal with namespace being a function,
// this is to interop with TypeScript since `invariant`
// does not export a default
// https://github.com/rollup/rollup/issues/1267
const hoistNonReactStatics = hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_1___default.a || hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_1__;

function getDisplayName(Component) {
    return Component.displayName || Component.name || 'Component';
}
// TODO: We should provide initial value here
const IntlContext = react__WEBPACK_IMPORTED_MODULE_0__["createContext"](null);
const { Consumer: IntlConsumer, Provider: IntlProvider } = IntlContext;
const Provider = IntlProvider;
const Context = IntlContext;
function injectIntl(WrappedComponent, options) {
    const { intlPropName = 'intl', forwardRef = false, enforceContext = true } = options || {};
    const WithIntl = props => (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](IntlConsumer, null, intl => {
        if (enforceContext) {
            Object(_utils__WEBPACK_IMPORTED_MODULE_2__["invariantIntlContext"])(intl);
        }
        return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](WrappedComponent, Object.assign({}, props, {
            [intlPropName]: intl,
        }, { ref: forwardRef ? props.forwardedRef : null })));
    }));
    WithIntl.displayName = `injectIntl(${getDisplayName(WrappedComponent)})`;
    WithIntl.WrappedComponent = WrappedComponent;
    if (forwardRef) {
        return hoistNonReactStatics(react__WEBPACK_IMPORTED_MODULE_0__["forwardRef"]((props, ref) => (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](WithIntl, Object.assign({}, props, { forwardedRef: ref })))), WrappedComponent);
    }
    return hoistNonReactStatics(WithIntl, WrappedComponent);
}


/***/ }),

/***/ "./node_modules/react-intl/lib/components/message.js":
/*!***********************************************************!*\
  !*** ./node_modules/react-intl/lib/components/message.js ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _injectIntl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./injectIntl */ "./node_modules/react-intl/lib/components/injectIntl.js");
/* harmony import */ var _format__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../format */ "./node_modules/react-intl/lib/format.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ "./node_modules/react-intl/lib/utils.js");
/* harmony import */ var shallow_equal_objects__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! shallow-equal/objects */ "./node_modules/shallow-equal/objects/index.js");
/* harmony import */ var shallow_equal_objects__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(shallow_equal_objects__WEBPACK_IMPORTED_MODULE_4__);
/*
 * Copyright 2015, Yahoo Inc.
 * Copyrights licensed under the New BSD License.
 * See the accompanying LICENSE file for terms.
 */
var __rest = (undefined && undefined.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
            t[p[i]] = s[p[i]];
    return t;
};





const shallowEquals = shallow_equal_objects__WEBPACK_IMPORTED_MODULE_4___default.a || shallow_equal_objects__WEBPACK_IMPORTED_MODULE_4__;
const defaultFormatMessage = (descriptor, values) => {
    if (true) {
        console.error('[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry. Using default message as fallback.');
    }
    return Object(_format__WEBPACK_IMPORTED_MODULE_2__["formatMessage"])(Object.assign({}, _utils__WEBPACK_IMPORTED_MODULE_3__["DEFAULT_INTL_CONFIG"], { locale: 'en' }), Object(_utils__WEBPACK_IMPORTED_MODULE_3__["createFormatters"])(), descriptor, values);
};
class FormattedMessage extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
    shouldComponentUpdate(nextProps) {
        const _a = this.props, { values } = _a, otherProps = __rest(_a, ["values"]);
        const { values: nextValues } = nextProps, nextOtherProps = __rest(nextProps, ["values"]);
        return (!shallowEquals(nextValues, values) ||
            !shallowEquals(otherProps, nextOtherProps));
    }
    render() {
        return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_injectIntl__WEBPACK_IMPORTED_MODULE_1__["Context"].Consumer, null, intl => {
            if (!this.props.defaultMessage) {
                Object(_utils__WEBPACK_IMPORTED_MODULE_3__["invariantIntlContext"])(intl);
            }
            const { formatMessage = defaultFormatMessage, textComponent: Text = react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], } = intl || {};
            const { id, description, defaultMessage, values, children, tagName: Component = Text, } = this.props;
            const descriptor = { id, description, defaultMessage };
            let nodes = formatMessage(descriptor, values);
            if (!Array.isArray(nodes)) {
                nodes = [nodes];
            }
            if (typeof children === 'function') {
                return children(...nodes);
            }
            if (Component) {
                // Needs to use `createElement()` instead of JSX, otherwise React will
                // warn about a missing `key` prop with rich-text message formatting.
                return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](Component, null, ...nodes);
            }
            return nodes;
        }));
    }
}
FormattedMessage.displayName = 'FormattedMessage';
FormattedMessage.defaultProps = {
    values: {},
};
/* harmony default export */ __webpack_exports__["default"] = (FormattedMessage);


/***/ }),

/***/ "./node_modules/react-intl/lib/components/plural.js":
/*!**********************************************************!*\
  !*** ./node_modules/react-intl/lib/components/plural.js ***!
  \**********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _injectIntl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./injectIntl */ "./node_modules/react-intl/lib/components/injectIntl.js");
/*
 * Copyright 2015, Yahoo Inc.
 * Copyrights licensed under the New BSD License.
 * See the accompanying LICENSE file for terms.
 */


const FormattedPlural = props => {
    const { value, other, children, intl: { formatPlural, textComponent: Text }, } = props;
    let pluralCategory = formatPlural(value, props);
    let formattedPlural = props[pluralCategory] || other;
    if (typeof children === 'function') {
        return children(formattedPlural);
    }
    if (Text) {
        return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](Text, null, formattedPlural);
    }
    // Work around @types/react where React.FC cannot return string
    return formattedPlural;
};
FormattedPlural.defaultProps = {
    type: 'cardinal',
};
FormattedPlural.displayName = 'FormattedPlural';
/* harmony default export */ __webpack_exports__["default"] = (Object(_injectIntl__WEBPACK_IMPORTED_MODULE_1__["default"])(FormattedPlural));


/***/ }),

/***/ "./node_modules/react-intl/lib/components/provider.js":
/*!************************************************************!*\
  !*** ./node_modules/react-intl/lib/components/provider.js ***!
  \************************************************************/
/*! exports provided: default, createIntl */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return IntlProvider; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createIntl", function() { return createIntl; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _injectIntl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./injectIntl */ "./node_modules/react-intl/lib/components/injectIntl.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "./node_modules/react-intl/lib/utils.js");
/* harmony import */ var _format__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../format */ "./node_modules/react-intl/lib/format.js");
/* harmony import */ var intl_locales_supported__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! intl-locales-supported */ "./node_modules/intl-locales-supported/lib/index.js");
/* harmony import */ var shallow_equal_objects__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! shallow-equal/objects */ "./node_modules/shallow-equal/objects/index.js");
/* harmony import */ var shallow_equal_objects__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(shallow_equal_objects__WEBPACK_IMPORTED_MODULE_5__);
/*
 * Copyright 2015, Yahoo Inc.
 * Copyrights licensed under the New BSD License.
 * See the accompanying LICENSE file for terms.
 */






const shallowEquals = shallow_equal_objects__WEBPACK_IMPORTED_MODULE_5___default.a || shallow_equal_objects__WEBPACK_IMPORTED_MODULE_5__;
function filterIntlConfig(config) {
    return {
        locale: config.locale,
        timeZone: config.timeZone,
        formats: config.formats,
        textComponent: config.textComponent,
        messages: config.messages,
        defaultLocale: config.defaultLocale,
        defaultFormats: config.defaultFormats,
        onError: config.onError,
    };
}
class IntlProvider extends react__WEBPACK_IMPORTED_MODULE_0__["PureComponent"] {
    constructor() {
        super(...arguments);
        this.cache = Object(_utils__WEBPACK_IMPORTED_MODULE_2__["createIntlCache"])();
        this.state = {
            cache: this.cache,
            intl: createIntl(filterIntlConfig(this.props), this.cache),
            prevConfig: filterIntlConfig(this.props),
        };
    }
    static getDerivedStateFromProps(props, { prevConfig, cache }) {
        const config = filterIntlConfig(props);
        if (!shallowEquals(prevConfig, config)) {
            return {
                intl: createIntl(config, cache),
                prevConfig: config,
            };
        }
        return null;
    }
    render() {
        Object(_utils__WEBPACK_IMPORTED_MODULE_2__["invariantIntlContext"])(this.state.intl);
        return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_injectIntl__WEBPACK_IMPORTED_MODULE_1__["Provider"], { value: this.state.intl }, this.props.children);
    }
}
IntlProvider.displayName = 'IntlProvider';
IntlProvider.defaultProps = _utils__WEBPACK_IMPORTED_MODULE_2__["DEFAULT_INTL_CONFIG"];
/**
 * Create intl object
 * @param config intl config
 * @param cache cache for formatter instances to prevent memory leak
 */
function createIntl(config, cache) {
    const formatters = Object(_utils__WEBPACK_IMPORTED_MODULE_2__["createFormatters"])(cache);
    const resolvedConfig = Object.assign({}, _utils__WEBPACK_IMPORTED_MODULE_2__["DEFAULT_INTL_CONFIG"], config);
    if (!resolvedConfig.locale ||
        !Object(intl_locales_supported__WEBPACK_IMPORTED_MODULE_4__["default"])(resolvedConfig.locale)) {
        const { locale, defaultLocale, onError } = resolvedConfig;
        if (typeof onError === 'function') {
            onError(Object(_utils__WEBPACK_IMPORTED_MODULE_2__["createError"])(`Missing locale data for locale: "${locale}". ` +
                `Using default locale: "${defaultLocale}" as fallback.`));
        }
        // Since there's no registered locale data for `locale`, this will
        // fallback to the `defaultLocale` to make sure things can render.
        // The `messages` are overridden to the `defaultProps` empty object
        // to maintain referential equality across re-renders. It's assumed
        // each <FormattedMessage> contains a `defaultMessage` prop.
        resolvedConfig.locale = resolvedConfig.defaultLocale || 'en';
    }
    return Object.assign({}, resolvedConfig, { formatters, formatNumber: _format__WEBPACK_IMPORTED_MODULE_3__["formatNumber"].bind(undefined, resolvedConfig, formatters), formatRelativeTime: _format__WEBPACK_IMPORTED_MODULE_3__["formatRelativeTime"].bind(undefined, resolvedConfig, formatters), formatDate: _format__WEBPACK_IMPORTED_MODULE_3__["formatDate"].bind(undefined, resolvedConfig, formatters), formatTime: _format__WEBPACK_IMPORTED_MODULE_3__["formatTime"].bind(undefined, resolvedConfig, formatters), formatPlural: _format__WEBPACK_IMPORTED_MODULE_3__["formatPlural"].bind(undefined, resolvedConfig, formatters), formatMessage: _format__WEBPACK_IMPORTED_MODULE_3__["formatMessage"].bind(undefined, resolvedConfig, formatters), formatHTMLMessage: _format__WEBPACK_IMPORTED_MODULE_3__["formatHTMLMessage"].bind(undefined, resolvedConfig, formatters) });
}


/***/ }),

/***/ "./node_modules/react-intl/lib/components/relative.js":
/*!************************************************************!*\
  !*** ./node_modules/react-intl/lib/components/relative.js ***!
  \************************************************************/
/*! exports provided: FormattedRelativeTime, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormattedRelativeTime", function() { return FormattedRelativeTime; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _injectIntl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./injectIntl */ "./node_modules/react-intl/lib/components/injectIntl.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "./node_modules/react-intl/lib/utils.js");
/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_3__);
/*
 * Copyright 2015, Yahoo Inc.
 * Copyrights licensed under the New BSD License.
 * See the accompanying LICENSE file for terms.
 */



// Since rollup cannot deal with namespace being a function,
// this is to interop with TypeScript since `invariant`
// does not export a default
// https://github.com/rollup/rollup/issues/1267

const invariant = invariant__WEBPACK_IMPORTED_MODULE_3___default.a || invariant__WEBPACK_IMPORTED_MODULE_3__;
const MINUTE = 60;
const HOUR = 60 * 60;
const DAY = 60 * 60 * 24;
function selectUnit(seconds) {
    const absValue = Math.abs(seconds);
    if (absValue < MINUTE) {
        return 'second';
    }
    if (absValue < HOUR) {
        return 'minute';
    }
    if (absValue < DAY) {
        return 'hour';
    }
    return 'day';
}
function getDurationInSeconds(unit) {
    switch (unit) {
        case 'second':
            return 1;
        case 'minute':
            return MINUTE;
        case 'hour':
            return HOUR;
        default:
            return DAY;
    }
}
function valueToSeconds(value, unit) {
    if (!value) {
        return 0;
    }
    switch (unit) {
        case 'second':
            return value;
        case 'minute':
            return value * MINUTE;
        default:
            return value * HOUR;
    }
}
const INCREMENTABLE_UNITS = ['second', 'minute', 'hour'];
function canIncrement(unit = 'second') {
    return INCREMENTABLE_UNITS.includes(unit);
}
function verifyProps(updateIntervalInSeconds, unit) {
    invariant(!updateIntervalInSeconds || (updateIntervalInSeconds && canIncrement(unit)), 'Cannot schedule update with unit longer than hour');
}
class FormattedRelativeTime extends react__WEBPACK_IMPORTED_MODULE_0__["PureComponent"] {
    constructor(props) {
        super(props);
        // Public for testing
        this._updateTimer = null;
        this.state = {
            prevUnit: this.props.unit,
            prevValue: this.props.value,
            currentValueInSeconds: canIncrement(this.props.unit)
                ? valueToSeconds(this.props.value, this.props.unit)
                : 0,
        };
        verifyProps(props.updateIntervalInSeconds, props.unit);
    }
    scheduleNextUpdate({ updateIntervalInSeconds, unit }, { currentValueInSeconds }) {
        clearTimeout(this._updateTimer);
        this._updateTimer = null;
        // If there's no interval and we cannot increment this unit, do nothing
        if (!updateIntervalInSeconds || !canIncrement(unit)) {
            return;
        }
        // Figure out the next interesting time
        const nextValueInSeconds = currentValueInSeconds - updateIntervalInSeconds;
        const nextUnit = selectUnit(nextValueInSeconds);
        // We've reached the max auto incrementable unit, don't schedule another update
        if (nextUnit === 'day') {
            return;
        }
        const unitDuration = getDurationInSeconds(nextUnit);
        const remainder = nextValueInSeconds % unitDuration;
        const prevInterestingValueInSeconds = nextValueInSeconds - remainder;
        const nextInterestingValueInSeconds = prevInterestingValueInSeconds >= currentValueInSeconds
            ? prevInterestingValueInSeconds - unitDuration
            : prevInterestingValueInSeconds;
        const delayInSeconds = Math.abs(nextInterestingValueInSeconds - currentValueInSeconds);
        this._updateTimer = setTimeout(() => this.setState({
            currentValueInSeconds: nextInterestingValueInSeconds,
        }), delayInSeconds * 1e3);
    }
    componentDidMount() {
        this.scheduleNextUpdate(this.props, this.state);
    }
    componentDidUpdate() {
        this.scheduleNextUpdate(this.props, this.state);
    }
    componentWillUnmount() {
        clearTimeout(this._updateTimer);
        this._updateTimer = null;
    }
    static getDerivedStateFromProps(props, state) {
        if (props.unit !== state.prevUnit || props.value !== state.prevValue) {
            return {
                prevValue: props.value,
                prevUnit: props.unit,
                currentValueInSeconds: canIncrement(props.unit)
                    ? valueToSeconds(props.value, props.unit)
                    : 0,
            };
        }
        return null;
    }
    render() {
        return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_injectIntl__WEBPACK_IMPORTED_MODULE_1__["Context"].Consumer, null, intl => {
            Object(_utils__WEBPACK_IMPORTED_MODULE_2__["invariantIntlContext"])(intl);
            const { formatRelativeTime, textComponent: Text } = intl;
            const { children, value, unit, updateIntervalInSeconds } = this.props;
            const { currentValueInSeconds } = this.state;
            let currentValue = value || 0;
            let currentUnit = unit;
            if (canIncrement(unit) &&
                currentValueInSeconds &&
                updateIntervalInSeconds) {
                currentUnit = selectUnit(currentValueInSeconds);
                const unitDuration = getDurationInSeconds(currentUnit);
                currentValue = Math.round(currentValueInSeconds / unitDuration);
            }
            const formattedRelativeTime = formatRelativeTime(currentValue, currentUnit, Object.assign({}, this.props));
            if (typeof children === 'function') {
                return children(formattedRelativeTime);
            }
            if (Text) {
                return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](Text, null, formattedRelativeTime);
            }
            return formattedRelativeTime;
        }));
    }
}
FormattedRelativeTime.displayName = 'FormattedRelativeTime';
FormattedRelativeTime.defaultProps = {
    value: 0,
    unit: 'second',
};
/* harmony default export */ __webpack_exports__["default"] = (FormattedRelativeTime);


/***/ }),

/***/ "./node_modules/react-intl/lib/components/useIntl.js":
/*!***********************************************************!*\
  !*** ./node_modules/react-intl/lib/components/useIntl.js ***!
  \***********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return useIntl; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _injectIntl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./injectIntl */ "./node_modules/react-intl/lib/components/injectIntl.js");
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "./node_modules/react-intl/lib/utils.js");



function useIntl() {
    const intl = Object(react__WEBPACK_IMPORTED_MODULE_0__["useContext"])(_injectIntl__WEBPACK_IMPORTED_MODULE_1__["Context"]);
    Object(_utils__WEBPACK_IMPORTED_MODULE_2__["invariantIntlContext"])(intl);
    return intl;
}


/***/ }),

/***/ "./node_modules/react-intl/lib/define-messages.js":
/*!********************************************************!*\
  !*** ./node_modules/react-intl/lib/define-messages.js ***!
  \********************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return defineMessages; });
function defineMessages(messageDescriptors) {
    // This simply returns what's passed-in because it's meant to be a hook for
    // babel-plugin-react-intl.
    return messageDescriptors;
}


/***/ }),

/***/ "./node_modules/react-intl/lib/format.js":
/*!***********************************************!*\
  !*** ./node_modules/react-intl/lib/format.js ***!
  \***********************************************/
/*! exports provided: formatDate, formatTime, formatRelativeTime, formatNumber, formatPlural, formatMessage, formatHTMLMessage, formatters */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatDate", function() { return formatDate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatTime", function() { return formatTime; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatRelativeTime", function() { return formatRelativeTime; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatNumber", function() { return formatNumber; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatPlural", function() { return formatPlural; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatMessage", function() { return formatMessage; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatHTMLMessage", function() { return formatHTMLMessage; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatters", function() { return formatters; });
/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ "./node_modules/react-intl/lib/utils.js");
/* harmony import */ var intl_messageformat_parser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! intl-messageformat-parser */ "./node_modules/intl-messageformat-parser/lib/index.js");
/*
 * Copyright 2015, Yahoo Inc.
 * Copyrights licensed under the New BSD License.
 * See the accompanying LICENSE file for terms.
 */
// Since rollup cannot deal with namespace being a function,
// this is to interop with TypeScript since `invariant`
// does not export a default
// https://github.com/rollup/rollup/issues/1267

const invariant = invariant__WEBPACK_IMPORTED_MODULE_0___default.a || invariant__WEBPACK_IMPORTED_MODULE_0__;


const DATE_TIME_FORMAT_OPTIONS = [
    'localeMatcher',
    'formatMatcher',
    'timeZone',
    'hour12',
    'weekday',
    'era',
    'year',
    'month',
    'day',
    'hour',
    'minute',
    'second',
    'timeZoneName',
];
const NUMBER_FORMAT_OPTIONS = [
    'localeMatcher',
    'style',
    'currency',
    'currencyDisplay',
    'useGrouping',
    'minimumIntegerDigits',
    'minimumFractionDigits',
    'maximumFractionDigits',
    'minimumSignificantDigits',
    'maximumSignificantDigits',
];
const RELATIVE_FORMAT_OPTIONS = [
    'numeric',
    'style',
];
const PLURAL_FORMAT_OPTIONS = [
    'localeMatcher',
    'type',
];
function getNamedFormat(formats, type, name, onError) {
    const formatType = formats && formats[type];
    let format;
    if (formatType) {
        format = formatType[name];
    }
    if (format) {
        return format;
    }
    onError(Object(_utils__WEBPACK_IMPORTED_MODULE_1__["createError"])(`No ${type} format named: ${name}`));
}
/**
 * Escape a raw msg when we run in prod mode
 * https://github.com/formatjs/formatjs/blob/master/packages/intl-messageformat-parser/src/parser.pegjs#L155
 */
function escapeUnformattedMessage(msg) {
    return msg.replace(/'\{(.*?)\}'/g, `{$1}`);
}
function formatDate({ locale, formats, onError, timeZone, }, state, ...[value, options = {}]) {
    const { format } = options;
    let defaults = Object.assign({}, (timeZone && { timeZone }), (format && getNamedFormat(formats, 'date', format, onError)));
    let filteredOptions = Object(_utils__WEBPACK_IMPORTED_MODULE_1__["filterProps"])(options, DATE_TIME_FORMAT_OPTIONS, defaults);
    const date = typeof value === 'string' ? new Date(value || 0) : value;
    try {
        return state.getDateTimeFormat(locale, filteredOptions).format(date);
    }
    catch (e) {
        onError(Object(_utils__WEBPACK_IMPORTED_MODULE_1__["createError"])('Error formatting date.', e));
    }
    return String(date);
}
function formatTime({ locale, formats, onError, timeZone, }, state, ...[value, options = {}]) {
    const { format } = options;
    let defaults = Object.assign({}, (timeZone && { timeZone }), (format && getNamedFormat(formats, 'time', format, onError)));
    let filteredOptions = Object(_utils__WEBPACK_IMPORTED_MODULE_1__["filterProps"])(options, DATE_TIME_FORMAT_OPTIONS, defaults);
    if (!filteredOptions.hour &&
        !filteredOptions.minute &&
        !filteredOptions.second) {
        // Add default formatting options if hour, minute, or second isn't defined.
        filteredOptions = Object.assign({}, filteredOptions, { hour: 'numeric', minute: 'numeric' });
    }
    const date = typeof value === 'string' ? new Date(value || 0) : value;
    try {
        return state.getDateTimeFormat(locale, filteredOptions).format(date);
    }
    catch (e) {
        onError(Object(_utils__WEBPACK_IMPORTED_MODULE_1__["createError"])('Error formatting time.', e));
    }
    return String(date);
}
function formatRelativeTime({ locale, formats, onError, }, state, ...[value, unit = 'second', options = {}]) {
    const { format } = options;
    let defaults = (!!format && getNamedFormat(formats, 'relative', format, onError)) || {};
    let filteredOptions = Object(_utils__WEBPACK_IMPORTED_MODULE_1__["filterProps"])(options, RELATIVE_FORMAT_OPTIONS, defaults);
    try {
        return state
            .getRelativeTimeFormat(locale, filteredOptions)
            .format(value, unit);
    }
    catch (e) {
        onError(Object(_utils__WEBPACK_IMPORTED_MODULE_1__["createError"])('Error formatting relative time.', e));
    }
    return String(value);
}
function formatNumber({ locale, formats, onError, }, state, ...[value, options = {}]) {
    const { format } = options;
    let defaults = (format && getNamedFormat(formats, 'number', format, onError)) || {};
    let filteredOptions = Object(_utils__WEBPACK_IMPORTED_MODULE_1__["filterProps"])(options, NUMBER_FORMAT_OPTIONS, defaults);
    try {
        return state.getNumberFormat(locale, filteredOptions).format(value);
    }
    catch (e) {
        onError(Object(_utils__WEBPACK_IMPORTED_MODULE_1__["createError"])('Error formatting number.', e));
    }
    return String(value);
}
function formatPlural({ locale, onError }, state, ...[value, options = {}]) {
    let filteredOptions = Object(_utils__WEBPACK_IMPORTED_MODULE_1__["filterProps"])(options, PLURAL_FORMAT_OPTIONS);
    try {
        return state.getPluralRules(locale, filteredOptions).select(value);
    }
    catch (e) {
        onError(Object(_utils__WEBPACK_IMPORTED_MODULE_1__["createError"])('Error formatting plural.', e));
    }
    return 'other';
}
function formatMessage({ locale, formats, messages, defaultLocale, defaultFormats, onError, }, state, messageDescriptor = { id: '' }, values = {}) {
    const { id, defaultMessage } = messageDescriptor;
    // `id` is a required field of a Message Descriptor.
    invariant(id, '[React Intl] An `id` must be provided to format a message.');
    const message = messages && messages[id];
    const hasValues = Object.keys(values).length > 0;
    // Avoid expensive message formatting for simple messages without values. In
    // development messages will always be formatted in case of missing values.
    if (!hasValues && "development" === 'production') {
        const val = message || defaultMessage || id;
        if (typeof val === 'string') {
            return escapeUnformattedMessage(val);
        }
        invariant(val.length === 1 && val[0].type === intl_messageformat_parser__WEBPACK_IMPORTED_MODULE_2__["TYPE"].literal, 'Message has placeholders but no values was provided');
        return val[0].value;
    }
    let formattedMessageParts = [];
    if (message) {
        try {
            let formatter = state.getMessageFormat(message, locale, formats, {
                formatters: state,
            });
            formattedMessageParts = formatter.formatXMLMessage(values);
        }
        catch (e) {
            onError(Object(_utils__WEBPACK_IMPORTED_MODULE_1__["createError"])(`Error formatting message: "${id}" for locale: "${locale}"` +
                (defaultMessage ? ', using default message as fallback.' : ''), e));
        }
    }
    else {
        // This prevents warnings from littering the console in development
        // when no `messages` are passed into the <IntlProvider> for the
        // default locale, and a default message is in the source.
        if (!defaultMessage ||
            (locale && locale.toLowerCase() !== defaultLocale.toLowerCase())) {
            onError(Object(_utils__WEBPACK_IMPORTED_MODULE_1__["createError"])(`Missing message: "${id}" for locale: "${locale}"` +
                (defaultMessage ? ', using default message as fallback.' : '')));
        }
    }
    if (!formattedMessageParts.length && defaultMessage) {
        try {
            let formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats);
            formattedMessageParts = formatter.formatXMLMessage(values);
        }
        catch (e) {
            onError(Object(_utils__WEBPACK_IMPORTED_MODULE_1__["createError"])(`Error formatting the default message for: "${id}"`, e));
        }
    }
    if (!formattedMessageParts.length) {
        onError(Object(_utils__WEBPACK_IMPORTED_MODULE_1__["createError"])(`Cannot format message: "${id}", ` +
            `using message ${message || defaultMessage ? 'source' : 'id'} as fallback.`));
        if (typeof message === 'string') {
            return message || defaultMessage || id;
        }
        return defaultMessage || id;
    }
    if (formattedMessageParts.length === 1 &&
        typeof formattedMessageParts[0] === 'string') {
        return formattedMessageParts[0] || defaultMessage || id;
    }
    return formattedMessageParts;
}
function formatHTMLMessage(config, state, messageDescriptor = { id: '' }, rawValues = {}) {
    // Process all the values before they are used when formatting the ICU
    // Message string. Since the formatted message might be injected via
    // `innerHTML`, all String-based values need to be HTML-escaped.
    let escapedValues = Object.keys(rawValues).reduce((escaped, name) => {
        let value = rawValues[name];
        escaped[name] = typeof value === 'string' ? Object(_utils__WEBPACK_IMPORTED_MODULE_1__["escape"])(value) : value;
        return escaped;
    }, {});
    return formatMessage(config, state, messageDescriptor, escapedValues);
}
const formatters = {
    formatNumber,
    formatDate,
    formatTime,
    formatMessage,
    formatPlural,
    formatHTMLMessage,
    formatRelativeTime,
};


/***/ }),

/***/ "./node_modules/react-intl/lib/index.js":
/*!**********************************************!*\
  !*** ./node_modules/react-intl/lib/index.js ***!
  \**********************************************/
/*! exports provided: defineMessages, injectIntl, RawIntlProvider, IntlContext, useIntl, IntlProvider, createIntl, FormattedDate, FormattedTime, FormattedNumber, FormattedRelativeTime, FormattedPlural, FormattedMessage, FormattedHTMLMessage, createIntlCache */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormattedDate", function() { return FormattedDate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormattedTime", function() { return FormattedTime; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormattedNumber", function() { return FormattedNumber; });
/* harmony import */ var _define_messages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define-messages */ "./node_modules/react-intl/lib/define-messages.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defineMessages", function() { return _define_messages__WEBPACK_IMPORTED_MODULE_0__["default"]; });

/* harmony import */ var _components_createFormattedComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/createFormattedComponent */ "./node_modules/react-intl/lib/components/createFormattedComponent.js");
/* harmony import */ var _components_injectIntl__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/injectIntl */ "./node_modules/react-intl/lib/components/injectIntl.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "injectIntl", function() { return _components_injectIntl__WEBPACK_IMPORTED_MODULE_2__["default"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RawIntlProvider", function() { return _components_injectIntl__WEBPACK_IMPORTED_MODULE_2__["Provider"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IntlContext", function() { return _components_injectIntl__WEBPACK_IMPORTED_MODULE_2__["Context"]; });

/* harmony import */ var _components_useIntl__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/useIntl */ "./node_modules/react-intl/lib/components/useIntl.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useIntl", function() { return _components_useIntl__WEBPACK_IMPORTED_MODULE_3__["default"]; });

/* harmony import */ var _components_provider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/provider */ "./node_modules/react-intl/lib/components/provider.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IntlProvider", function() { return _components_provider__WEBPACK_IMPORTED_MODULE_4__["default"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createIntl", function() { return _components_provider__WEBPACK_IMPORTED_MODULE_4__["createIntl"]; });

/* harmony import */ var _components_relative__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/relative */ "./node_modules/react-intl/lib/components/relative.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormattedRelativeTime", function() { return _components_relative__WEBPACK_IMPORTED_MODULE_5__["default"]; });

/* harmony import */ var _components_plural__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/plural */ "./node_modules/react-intl/lib/components/plural.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormattedPlural", function() { return _components_plural__WEBPACK_IMPORTED_MODULE_6__["default"]; });

/* harmony import */ var _components_message__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/message */ "./node_modules/react-intl/lib/components/message.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormattedMessage", function() { return _components_message__WEBPACK_IMPORTED_MODULE_7__["default"]; });

/* harmony import */ var _components_html_message__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./components/html-message */ "./node_modules/react-intl/lib/components/html-message.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormattedHTMLMessage", function() { return _components_html_message__WEBPACK_IMPORTED_MODULE_8__["default"]; });

/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils */ "./node_modules/react-intl/lib/utils.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createIntlCache", function() { return _utils__WEBPACK_IMPORTED_MODULE_9__["createIntlCache"]; });

/*
 * Copyright 2015, Yahoo Inc.
 * Copyrights licensed under the New BSD License.
 * See the accompanying LICENSE file for terms.
 */





const FormattedDate = Object(_components_createFormattedComponent__WEBPACK_IMPORTED_MODULE_1__["default"])('formatDate');
const FormattedTime = Object(_components_createFormattedComponent__WEBPACK_IMPORTED_MODULE_1__["default"])('formatTime');
const FormattedNumber = Object(_components_createFormattedComponent__WEBPACK_IMPORTED_MODULE_1__["default"])('formatNumber');







/***/ }),

/***/ "./node_modules/react-intl/lib/utils.js":
/*!**********************************************!*\
  !*** ./node_modules/react-intl/lib/utils.js ***!
  \**********************************************/
/*! exports provided: escape, filterProps, invariantIntlContext, createError, defaultErrorHandler, DEFAULT_INTL_CONFIG, createIntlCache, createFormatters */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "escape", function() { return escape; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filterProps", function() { return filterProps; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "invariantIntlContext", function() { return invariantIntlContext; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createError", function() { return createError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultErrorHandler", function() { return defaultErrorHandler; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_INTL_CONFIG", function() { return DEFAULT_INTL_CONFIG; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createIntlCache", function() { return createIntlCache; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createFormatters", function() { return createFormatters; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var intl_messageformat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! intl-messageformat */ "./node_modules/intl-messageformat/lib/index.js");
/* harmony import */ var intl_format_cache__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! intl-format-cache */ "./node_modules/intl-format-cache/lib/index.js");
/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js");
/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_3__);
/*
HTML escaping is the same as React's
(on purpose.) Therefore, it has the following Copyright and Licensing:

Copyright 2013-2014, Facebook, Inc.
All rights reserved.

This source code is licensed under the BSD-style license found in the LICENSE
file in the root directory of React's source tree.
*/



// Since rollup cannot deal with namespace being a function,
// this is to interop with TypeScript since `invariant`
// does not export a default
// https://github.com/rollup/rollup/issues/1267

const invariant = invariant__WEBPACK_IMPORTED_MODULE_3___default.a || invariant__WEBPACK_IMPORTED_MODULE_3__;
const ESCAPED_CHARS = {
    38: '&amp;',
    62: '&gt;',
    60: '&lt;',
    34: '&quot;',
    39: '&#x27;',
};
const UNSAFE_CHARS_REGEX = /[&><"']/g;
function escape(str) {
    return ('' + str).replace(UNSAFE_CHARS_REGEX, match => ESCAPED_CHARS[match.charCodeAt(0)]);
}
function filterProps(props, whitelist, defaults = {}) {
    return whitelist.reduce((filtered, name) => {
        if (props.hasOwnProperty(name)) {
            filtered[name] = props[name];
        }
        else if (defaults.hasOwnProperty(name)) {
            filtered[name] = defaults[name];
        }
        return filtered;
    }, {});
}
function invariantIntlContext(intl) {
    invariant(intl, '[React Intl] Could not find required `intl` object. ' +
        '<IntlProvider> needs to exist in the component ancestry.');
}
function createError(message, exception) {
    const eMsg = exception ? `\n${exception.stack}` : '';
    return `[React Intl] ${message}${eMsg}`;
}
function defaultErrorHandler(error) {
    if (true) {
        console.error(error);
    }
}
const DEFAULT_INTL_CONFIG = {
    formats: {},
    messages: {},
    timeZone: undefined,
    textComponent: react__WEBPACK_IMPORTED_MODULE_0__["Fragment"],
    defaultLocale: 'en',
    defaultFormats: {},
    onError: defaultErrorHandler,
};
function createIntlCache() {
    return {
        dateTime: {},
        number: {},
        message: {},
        relativeTime: {},
        pluralRules: {},
    };
}
/**
 * Create intl formatters and populate cache
 * @param cache explicit cache to prevent leaking memory
 */
function createFormatters(cache = createIntlCache()) {
    return {
        getDateTimeFormat: Object(intl_format_cache__WEBPACK_IMPORTED_MODULE_2__["default"])(Intl.DateTimeFormat, cache.dateTime),
        getNumberFormat: Object(intl_format_cache__WEBPACK_IMPORTED_MODULE_2__["default"])(Intl.NumberFormat, cache.number),
        getMessageFormat: Object(intl_format_cache__WEBPACK_IMPORTED_MODULE_2__["default"])(intl_messageformat__WEBPACK_IMPORTED_MODULE_1__["default"], cache.message),
        getRelativeTimeFormat: Object(intl_format_cache__WEBPACK_IMPORTED_MODULE_2__["default"])(Intl.RelativeTimeFormat, cache.relativeTime),
        getPluralRules: Object(intl_format_cache__WEBPACK_IMPORTED_MODULE_2__["default"])(Intl.PluralRules, cache.pluralRules),
    };
}


/***/ }),

/***/ "./node_modules/react-is/cjs/react-is.development.js":
/*!***********************************************************!*\
  !*** ./node_modules/react-is/cjs/react-is.development.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/** @license React v16.8.6
 * react-is.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */





if (true) {
  (function() {
'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
// nor polyfill, then a plain number is used for performance.
var hasSymbol = typeof Symbol === 'function' && Symbol.for;

var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;

function isValidElementType(type) {
  return typeof type === 'string' || typeof type === 'function' ||
  // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
  type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
}

/**
 * Forked from fbjs/warning:
 * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
 *
 * Only change is we use console.warn instead of console.error,
 * and do nothing when 'console' is not supported.
 * This really simplifies the code.
 * ---
 * Similar to invariant but only logs a warning if the condition is not met.
 * This can be used to log issues in development environments in critical
 * paths. Removing the logging code for production environments will keep the
 * same logic and follow the same code paths.
 */

var lowPriorityWarning = function () {};

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

    var argIndex = 0;
    var message = 'Warning: ' + format.replace(/%s/g, function () {
      return args[argIndex++];
    });
    if (typeof console !== 'undefined') {
      console.warn(message);
    }
    try {
      // --- Welcome to debugging React ---
      // This error was thrown as a convenience so that you can use this stack
      // to find the callsite that caused this warning to fire.
      throw new Error(message);
    } catch (x) {}
  };

  lowPriorityWarning = function (condition, format) {
    if (format === undefined) {
      throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
    }
    if (!condition) {
      for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
        args[_key2 - 2] = arguments[_key2];
      }

      printWarning.apply(undefined, [format].concat(args));
    }
  };
}

var lowPriorityWarning$1 = lowPriorityWarning;

function typeOf(object) {
  if (typeof object === 'object' && object !== null) {
    var $$typeof = object.$$typeof;
    switch ($$typeof) {
      case REACT_ELEMENT_TYPE:
        var type = object.type;

        switch (type) {
          case REACT_ASYNC_MODE_TYPE:
          case REACT_CONCURRENT_MODE_TYPE:
          case REACT_FRAGMENT_TYPE:
          case REACT_PROFILER_TYPE:
          case REACT_STRICT_MODE_TYPE:
          case REACT_SUSPENSE_TYPE:
            return type;
          default:
            var $$typeofType = type && type.$$typeof;

            switch ($$typeofType) {
              case REACT_CONTEXT_TYPE:
              case REACT_FORWARD_REF_TYPE:
              case REACT_PROVIDER_TYPE:
                return $$typeofType;
              default:
                return $$typeof;
            }
        }
      case REACT_LAZY_TYPE:
      case REACT_MEMO_TYPE:
      case REACT_PORTAL_TYPE:
        return $$typeof;
    }
  }

  return undefined;
}

// AsyncMode is deprecated along with isAsyncMode
var AsyncMode = REACT_ASYNC_MODE_TYPE;
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
var ContextConsumer = REACT_CONTEXT_TYPE;
var ContextProvider = REACT_PROVIDER_TYPE;
var Element = REACT_ELEMENT_TYPE;
var ForwardRef = REACT_FORWARD_REF_TYPE;
var Fragment = REACT_FRAGMENT_TYPE;
var Lazy = REACT_LAZY_TYPE;
var Memo = REACT_MEMO_TYPE;
var Portal = REACT_PORTAL_TYPE;
var Profiler = REACT_PROFILER_TYPE;
var StrictMode = REACT_STRICT_MODE_TYPE;
var Suspense = REACT_SUSPENSE_TYPE;

var hasWarnedAboutDeprecatedIsAsyncMode = false;

// AsyncMode should be deprecated
function isAsyncMode(object) {
  {
    if (!hasWarnedAboutDeprecatedIsAsyncMode) {
      hasWarnedAboutDeprecatedIsAsyncMode = true;
      lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
    }
  }
  return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
}
function isConcurrentMode(object) {
  return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
}
function isContextConsumer(object) {
  return typeOf(object) === REACT_CONTEXT_TYPE;
}
function isContextProvider(object) {
  return typeOf(object) === REACT_PROVIDER_TYPE;
}
function isElement(object) {
  return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
}
function isForwardRef(object) {
  return typeOf(object) === REACT_FORWARD_REF_TYPE;
}
function isFragment(object) {
  return typeOf(object) === REACT_FRAGMENT_TYPE;
}
function isLazy(object) {
  return typeOf(object) === REACT_LAZY_TYPE;
}
function isMemo(object) {
  return typeOf(object) === REACT_MEMO_TYPE;
}
function isPortal(object) {
  return typeOf(object) === REACT_PORTAL_TYPE;
}
function isProfiler(object) {
  return typeOf(object) === REACT_PROFILER_TYPE;
}
function isStrictMode(object) {
  return typeOf(object) === REACT_STRICT_MODE_TYPE;
}
function isSuspense(object) {
  return typeOf(object) === REACT_SUSPENSE_TYPE;
}

exports.typeOf = typeOf;
exports.AsyncMode = AsyncMode;
exports.ConcurrentMode = ConcurrentMode;
exports.ContextConsumer = ContextConsumer;
exports.ContextProvider = ContextProvider;
exports.Element = Element;
exports.ForwardRef = ForwardRef;
exports.Fragment = Fragment;
exports.Lazy = Lazy;
exports.Memo = Memo;
exports.Portal = Portal;
exports.Profiler = Profiler;
exports.StrictMode = StrictMode;
exports.Suspense = Suspense;
exports.isValidElementType = isValidElementType;
exports.isAsyncMode = isAsyncMode;
exports.isConcurrentMode = isConcurrentMode;
exports.isContextConsumer = isContextConsumer;
exports.isContextProvider = isContextProvider;
exports.isElement = isElement;
exports.isForwardRef = isForwardRef;
exports.isFragment = isFragment;
exports.isLazy = isLazy;
exports.isMemo = isMemo;
exports.isPortal = isPortal;
exports.isProfiler = isProfiler;
exports.isStrictMode = isStrictMode;
exports.isSuspense = isSuspense;
  })();
}


/***/ }),

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

"use strict";


if (false) {} else {
  module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js");
}


/***/ }),

/***/ "./node_modules/react-rnd/lib/index.js":
/*!*********************************************!*\
  !*** ./node_modules/react-rnd/lib/index.js ***!
  \*********************************************/
/*! exports provided: Rnd */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rnd", function() { return Rnd; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var re_resizable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! re-resizable */ "./node_modules/re-resizable/lib/index.js");
/* harmony import */ var re_resizable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(re_resizable__WEBPACK_IMPORTED_MODULE_1__);



/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global Reflect, Promise */

var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return extendStatics(d, b);
};

function __extends(d, b) {
    extendStatics(d, b);
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}

var __assign = function() {
    __assign = Object.assign || function __assign(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};

function __rest(s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
            t[p[i]] = s[p[i]];
    return t;
}

var Draggable = __webpack_require__(/*! react-draggable */ "react-draggable");
var resizableStyle = {
    width: "auto",
    height: "auto",
    display: "inline-block",
    position: "absolute",
    top: 0,
    left: 0,
};
var Rnd = /** @class */ (function (_super) {
    __extends(Rnd, _super);
    function Rnd(props) {
        var _this = _super.call(this, props) || this;
        _this.resizing = false;
        _this.resizingPosition = { x: 0, y: 0 };
        _this.refDraggable = function (c) {
            if (!c)
                return;
            _this.draggable = c;
        };
        _this.refResizable = function (c) {
            if (!c)
                return;
            _this.resizable = c;
        };
        _this.state = {
            original: {
                x: 0,
                y: 0,
            },
            bounds: {
                top: 0,
                right: 0,
                bottom: 0,
                left: 0,
            },
            maxWidth: props.maxWidth,
            maxHeight: props.maxHeight,
        };
        _this.onResizeStart = _this.onResizeStart.bind(_this);
        _this.onResize = _this.onResize.bind(_this);
        _this.onResizeStop = _this.onResizeStop.bind(_this);
        _this.onDragStart = _this.onDragStart.bind(_this);
        _this.onDrag = _this.onDrag.bind(_this);
        _this.onDragStop = _this.onDragStop.bind(_this);
        _this.getMaxSizesFromProps = _this.getMaxSizesFromProps.bind(_this);
        return _this;
    }
    Rnd.prototype.componentDidMount = function () {
        var _a = this.getOffsetFromParent(), left = _a.left, top = _a.top;
        var _b = this.getDraggablePosition(), x = _b.x, y = _b.y;
        this.draggable.setState({
            x: x - left,
            y: y - top,
        });
        // HACK: Apply position adjustment
        this.forceUpdate();
    };
    // HACK: To get `react-draggable` state x and y.
    Rnd.prototype.getDraggablePosition = function () {
        var _a = this.draggable.state, x = _a.x, y = _a.y;
        return { x: x, y: y };
    };
    Rnd.prototype.getParent = function () {
        return this.resizable && this.resizable.parentNode;
    };
    Rnd.prototype.getParentSize = function () {
        return this.resizable.getParentSize();
    };
    Rnd.prototype.getMaxSizesFromProps = function () {
        var maxWidth = typeof this.props.maxWidth === "undefined" ? Number.MAX_SAFE_INTEGER : this.props.maxWidth;
        var maxHeight = typeof this.props.maxHeight === "undefined" ? Number.MAX_SAFE_INTEGER : this.props.maxHeight;
        return { maxWidth: maxWidth, maxHeight: maxHeight };
    };
    Rnd.prototype.getSelfElement = function () {
        return this.resizable && this.resizable.resizable;
    };
    Rnd.prototype.getOffsetHeight = function (boundary) {
        var scale = this.props.scale;
        switch (this.props.bounds) {
            case "window":
                return window.innerHeight / scale;
            case "body":
                return document.body.offsetHeight / scale;
            default:
                return boundary.offsetHeight;
        }
    };
    Rnd.prototype.getOffsetWidth = function (boundary) {
        var scale = this.props.scale;
        switch (this.props.bounds) {
            case "window":
                return window.innerWidth / scale;
            case "body":
                return document.body.offsetWidth / scale;
            default:
                return boundary.offsetWidth;
        }
    };
    Rnd.prototype.onDragStart = function (e, data) {
        if (this.props.onDragStart) {
            this.props.onDragStart(e, data);
        }
        if (!this.props.bounds)
            return;
        var parent = this.getParent();
        var scale = this.props.scale;
        var boundary;
        if (this.props.bounds === "parent") {
            boundary = parent;
        }
        else if (this.props.bounds === "body") {
            var parentRect_1 = parent.getBoundingClientRect();
            var parentLeft_1 = parentRect_1.left;
            var parentTop_1 = parentRect_1.top;
            var bodyRect = document.body.getBoundingClientRect();
            var left_1 = -(parentLeft_1 - parent.offsetLeft * scale - bodyRect.left) / scale;
            var top_1 = -(parentTop_1 - parent.offsetTop * scale - bodyRect.top) / scale;
            var right = (document.body.offsetWidth - this.resizable.size.width * scale) / scale + left_1;
            var bottom = (document.body.offsetHeight - this.resizable.size.height * scale) / scale + top_1;
            return this.setState({ bounds: { top: top_1, right: right, bottom: bottom, left: left_1 } });
        }
        else if (this.props.bounds === "window") {
            if (!this.resizable)
                return;
            var parentRect_2 = parent.getBoundingClientRect();
            var parentLeft_2 = parentRect_2.left;
            var parentTop_2 = parentRect_2.top;
            var left_2 = -(parentLeft_2 - parent.offsetLeft * scale) / scale;
            var top_2 = -(parentTop_2 - parent.offsetTop * scale) / scale;
            var right = (window.innerWidth - this.resizable.size.width * scale) / scale + left_2;
            var bottom = (window.innerHeight - this.resizable.size.height * scale) / scale + top_2;
            return this.setState({ bounds: { top: top_2, right: right, bottom: bottom, left: left_2 } });
        }
        else {
            boundary = document.querySelector(this.props.bounds);
        }
        if (!(boundary instanceof HTMLElement) || !(parent instanceof HTMLElement)) {
            return;
        }
        var boundaryRect = boundary.getBoundingClientRect();
        var boundaryLeft = boundaryRect.left;
        var boundaryTop = boundaryRect.top;
        var parentRect = parent.getBoundingClientRect();
        var parentLeft = parentRect.left;
        var parentTop = parentRect.top;
        var left = (boundaryLeft - parentLeft) / scale;
        var top = boundaryTop - parentTop;
        if (!this.resizable)
            return;
        var offset = this.getOffsetFromParent();
        this.setState({
            bounds: {
                top: top - offset.top,
                right: left + (boundary.offsetWidth - this.resizable.size.width) - offset.left / scale,
                bottom: top + (boundary.offsetHeight - this.resizable.size.height) - offset.top,
                left: left - offset.left / scale,
            },
        });
    };
    Rnd.prototype.onDrag = function (e, data) {
        if (this.props.onDrag) {
            var offset = this.getOffsetFromParent();
            this.props.onDrag(e, __assign({}, data, { x: data.x - offset.left, y: data.y - offset.top }));
        }
    };
    Rnd.prototype.onDragStop = function (e, data) {
        if (this.props.onDragStop) {
            var _a = this.getOffsetFromParent(), left = _a.left, top_3 = _a.top;
            return this.props.onDragStop(e, __assign({}, data, { x: data.x + left, y: data.y + top_3 }));
        }
    };
    Rnd.prototype.onResizeStart = function (e, dir, elementRef) {
        e.stopPropagation();
        this.resizing = true;
        var scale = this.props.scale;
        this.setState({
            original: this.getDraggablePosition(),
        });
        if (this.props.bounds) {
            var parent_1 = this.getParent();
            var boundary = void 0;
            if (this.props.bounds === "parent") {
                boundary = parent_1;
            }
            else if (this.props.bounds === "body") {
                boundary = document.body;
            }
            else if (this.props.bounds === "window") {
                boundary = window;
            }
            else {
                boundary = document.querySelector(this.props.bounds);
            }
            var self_1 = this.getSelfElement();
            if (self_1 instanceof Element &&
                (boundary instanceof HTMLElement || boundary === window) &&
                parent_1 instanceof HTMLElement) {
                var _a = this.getMaxSizesFromProps(), maxWidth = _a.maxWidth, maxHeight = _a.maxHeight;
                var parentSize = this.getParentSize();
                if (maxWidth && typeof maxWidth === "string") {
                    if (maxWidth.endsWith("%")) {
                        var ratio = Number(maxWidth.replace("%", "")) / 100;
                        maxWidth = parentSize.width * ratio;
                    }
                    else if (maxWidth.endsWith("px")) {
                        maxWidth = Number(maxWidth.replace("px", ""));
                    }
                }
                if (maxHeight && typeof maxHeight === "string") {
                    if (maxHeight.endsWith("%")) {
                        var ratio = Number(maxHeight.replace("%", "")) / 100;
                        maxHeight = parentSize.width * ratio;
                    }
                    else if (maxHeight.endsWith("px")) {
                        maxHeight = Number(maxHeight.replace("px", ""));
                    }
                }
                var selfRect = self_1.getBoundingClientRect();
                var selfLeft = selfRect.left;
                var selfTop = selfRect.top;
                var boundaryRect = this.props.bounds === "window" ? { left: 0, top: 0 } : boundary.getBoundingClientRect();
                var boundaryLeft = boundaryRect.left;
                var boundaryTop = boundaryRect.top;
                var offsetWidth = this.getOffsetWidth(boundary);
                var offsetHeight = this.getOffsetHeight(boundary);
                var hasLeft = dir.toLowerCase().endsWith("left");
                var hasRight = dir.toLowerCase().endsWith("right");
                var hasTop = dir.startsWith("top");
                var hasBottom = dir.startsWith("bottom");
                if (hasLeft && this.resizable) {
                    var max = (selfLeft - boundaryLeft) / scale + this.resizable.size.width;
                    this.setState({ maxWidth: max > Number(maxWidth) ? maxWidth : max });
                }
                // INFO: To set bounds in `lock aspect ratio with bounds` case. See also that story.
                if (hasRight || (this.props.lockAspectRatio && !hasLeft)) {
                    var max = offsetWidth + (boundaryLeft - selfLeft) / scale;
                    this.setState({ maxWidth: max > Number(maxWidth) ? maxWidth : max });
                }
                if (hasTop && this.resizable) {
                    var max = (selfTop - boundaryTop) / scale + this.resizable.size.height;
                    this.setState({
                        maxHeight: max > Number(maxHeight) ? maxHeight : max,
                    });
                }
                // INFO: To set bounds in `lock aspect ratio with bounds` case. See also that story.
                if (hasBottom || (this.props.lockAspectRatio && !hasTop)) {
                    var max = offsetHeight + (boundaryTop - selfTop) / scale;
                    this.setState({
                        maxHeight: max > Number(maxHeight) ? maxHeight : max,
                    });
                }
            }
        }
        else {
            this.setState({
                maxWidth: this.props.maxWidth,
                maxHeight: this.props.maxHeight,
            });
        }
        if (this.props.onResizeStart) {
            this.props.onResizeStart(e, dir, elementRef);
        }
    };
    Rnd.prototype.onResize = function (e, direction, elementRef, delta) {
        var x;
        var y;
        var offset = this.getOffsetFromParent();
        if (/left/i.test(direction)) {
            x = this.state.original.x - delta.width;
            // INFO: Apply x position by resize to draggable.
            this.draggable.setState({ x: x });
            x += offset.left;
        }
        if (/top/i.test(direction)) {
            y = this.state.original.y - delta.height;
            // INFO: Apply x position by resize to draggable.
            this.draggable.setState({ y: y });
            y += offset.top;
        }
        if (typeof x === "undefined") {
            x = this.getDraggablePosition().x + offset.left;
        }
        if (typeof y === "undefined") {
            y = this.getDraggablePosition().y + offset.top;
        }
        this.resizingPosition = { x: x, y: y };
        if (!this.props.onResize)
            return;
        this.props.onResize(e, direction, elementRef, delta, {
            x: x,
            y: y,
        });
    };
    Rnd.prototype.onResizeStop = function (e, direction, elementRef, delta) {
        this.resizing = false;
        var _a = this.getMaxSizesFromProps(), maxWidth = _a.maxWidth, maxHeight = _a.maxHeight;
        this.setState({ maxWidth: maxWidth, maxHeight: maxHeight });
        if (this.props.onResizeStop) {
            this.props.onResizeStop(e, direction, elementRef, delta, this.resizingPosition);
        }
    };
    Rnd.prototype.updateSize = function (size) {
        if (!this.resizable)
            return;
        this.resizable.updateSize({ width: size.width, height: size.height });
    };
    Rnd.prototype.updatePosition = function (position) {
        this.draggable.setState(position);
    };
    Rnd.prototype.getOffsetFromParent = function () {
        var scale = this.props.scale;
        var parent = this.getParent();
        var self = this.getSelfElement();
        if (!parent || self === null) {
            return {
                top: 0,
                left: 0,
            };
        }
        var parentRect = parent.getBoundingClientRect();
        var parentLeft = parentRect.left;
        var parentTop = parentRect.top;
        var selfRect = self.getBoundingClientRect();
        var position = this.getDraggablePosition();
        return {
            left: selfRect.left - parentLeft - position.x * scale,
            top: selfRect.top - parentTop - position.y * scale,
        };
    };
    Rnd.prototype.render = function () {
        var _a = this.props, disableDragging = _a.disableDragging, style = _a.style, dragHandleClassName = _a.dragHandleClassName, position = _a.position, onMouseDown = _a.onMouseDown, onMouseUp = _a.onMouseUp, dragAxis = _a.dragAxis, dragGrid = _a.dragGrid, bounds = _a.bounds, enableUserSelectHack = _a.enableUserSelectHack, cancel = _a.cancel, children = _a.children, onResizeStart = _a.onResizeStart, onResize = _a.onResize, onResizeStop = _a.onResizeStop, onDragStart = _a.onDragStart, onDrag = _a.onDrag, onDragStop = _a.onDragStop, resizeHandleStyles = _a.resizeHandleStyles, resizeHandleClasses = _a.resizeHandleClasses, enableResizing = _a.enableResizing, resizeGrid = _a.resizeGrid, resizeHandleWrapperClass = _a.resizeHandleWrapperClass, resizeHandleWrapperStyle = _a.resizeHandleWrapperStyle, scale = _a.scale, resizableProps = __rest(_a, ["disableDragging", "style", "dragHandleClassName", "position", "onMouseDown", "onMouseUp", "dragAxis", "dragGrid", "bounds", "enableUserSelectHack", "cancel", "children", "onResizeStart", "onResize", "onResizeStop", "onDragStart", "onDrag", "onDragStop", "resizeHandleStyles", "resizeHandleClasses", "enableResizing", "resizeGrid", "resizeHandleWrapperClass", "resizeHandleWrapperStyle", "scale"]);
        var defaultValue = this.props.default ? __assign({}, this.props.default) : undefined;
        // Remove unknown props, see also https://reactjs.org/warnings/unknown-prop.html
        delete resizableProps.default;
        var cursorStyle = disableDragging || dragHandleClassName ? { cursor: "auto" } : { cursor: "move" };
        var innerStyle = __assign({}, resizableStyle, cursorStyle, style);
        var _b = this.getOffsetFromParent(), left = _b.left, top = _b.top;
        var draggablePosition;
        if (position) {
            draggablePosition = {
                x: position.x - left,
                y: position.y - top,
            };
        }
        // INFO: Make uncontorolled component when resizing to control position by setPostion.
        var pos = this.resizing ? undefined : draggablePosition;
        return (Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])(Draggable, { ref: this.refDraggable, handle: dragHandleClassName ? "." + dragHandleClassName : undefined, defaultPosition: defaultValue, onMouseDown: onMouseDown, onMouseUp: onMouseUp, onStart: this.onDragStart, onDrag: this.onDrag, onStop: this.onDragStop, axis: dragAxis, disabled: disableDragging, grid: dragGrid, bounds: bounds ? this.state.bounds : undefined, position: pos, enableUserSelectHack: enableUserSelectHack, cancel: cancel, scale: scale },
            Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])(re_resizable__WEBPACK_IMPORTED_MODULE_1__["Resizable"], __assign({}, resizableProps, { ref: this.refResizable, defaultSize: defaultValue, size: this.props.size, enable: enableResizing, onResizeStart: this.onResizeStart, onResize: this.onResize, onResizeStop: this.onResizeStop, style: innerStyle, minWidth: this.props.minWidth, minHeight: this.props.minHeight, maxWidth: this.resizing ? this.state.maxWidth : this.props.maxWidth, maxHeight: this.resizing ? this.state.maxHeight : this.props.maxHeight, grid: resizeGrid, handleWrapperClass: resizeHandleWrapperClass, handleWrapperStyle: resizeHandleWrapperStyle, lockAspectRatio: this.props.lockAspectRatio, lockAspectRatioExtraWidth: this.props.lockAspectRatioExtraWidth, lockAspectRatioExtraHeight: this.props.lockAspectRatioExtraHeight, handleStyles: resizeHandleStyles, handleClasses: resizeHandleClasses, scale: this.props.scale }), children)));
    };
    Rnd.defaultProps = {
        maxWidth: Number.MAX_SAFE_INTEGER,
        maxHeight: Number.MAX_SAFE_INTEGER,
        scale: 1,
        onResizeStart: function () { },
        onResize: function () { },
        onResizeStop: function () { },
        onDragStart: function () { },
        onDrag: function () { },
        onDragStop: function () { },
    };
    return Rnd;
}(react__WEBPACK_IMPORTED_MODULE_0__["PureComponent"]));




/***/ }),

/***/ "./node_modules/react-use-websocket/dist/index.js":
/*!********************************************************!*\
  !*** ./node_modules/react-use-websocket/dist/index.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var use_websocket_1 = __webpack_require__(/*! ./lib/use-websocket */ "./node_modules/react-use-websocket/dist/lib/use-websocket.js");
var use_socket_io_1 = __webpack_require__(/*! ./lib/use-socket-io */ "./node_modules/react-use-websocket/dist/lib/use-socket-io.js");
exports.useSocketIO = use_socket_io_1.useSocketIO;
exports.default = use_websocket_1.useWebSocket;


/***/ }),

/***/ "./node_modules/react-use-websocket/dist/lib/add-subscriber.js":
/*!*********************************************************************!*\
  !*** ./node_modules/react-use-websocket/dist/lib/add-subscriber.js ***!
  \*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var constants_1 = __webpack_require__(/*! ./constants */ "./node_modules/react-use-websocket/dist/lib/constants.js");
var globals_1 = __webpack_require__(/*! ./globals */ "./node_modules/react-use-websocket/dist/lib/globals.js");
var subscribers = {};
exports.addSubscriber = function (webSocketInstance, url, setters, options) {
    if (options === void 0) { options = {}; }
    var setLastMessage = setters.setLastMessage, setReadyState = setters.setReadyState;
    if (subscribers[url] === undefined) {
        subscribers[url] = [];
        webSocketInstance.onmessage = function (message) {
            if (typeof options.filter === 'function' && options.filter(message) !== true) {
                return;
            }
            subscribers[url].forEach(function (subscriber) {
                subscriber.setLastMessage(message);
                if (subscriber.options.onMessage) {
                    subscriber.options.onMessage(message);
                }
            });
        };
        webSocketInstance.onclose = function (event) {
            subscribers[url].forEach(function (subscriber) {
                subscriber.setReadyState(function (prev) {
                    var _a;
                    return Object.assign({}, prev, (_a = {}, _a[url] = constants_1.READY_STATE_CLOSED, _a));
                });
                if (subscriber.options.onClose) {
                    subscriber.options.onClose(event);
                }
            });
            subscribers[url] = undefined;
            globals_1.sharedWebSockets[url] = undefined;
        };
        webSocketInstance.onerror = function (error) {
            subscribers[url].forEach(function (subscriber) {
                if (subscriber.options.onError) {
                    subscriber.options.onError(error);
                }
            });
        };
        webSocketInstance.onopen = function (event) {
            subscribers[url].forEach(function (subscriber) {
                subscriber.setReadyState(function (prev) {
                    var _a;
                    return Object.assign({}, prev, (_a = {}, _a[url] = constants_1.READY_STATE_OPEN, _a));
                });
                if (subscriber.options.onOpen) {
                    subscriber.options.onOpen(event);
                }
            });
        };
    }
    else {
        setReadyState(function (prev) {
            var _a;
            return Object.assign({}, prev, (_a = {}, _a[url] = globals_1.sharedWebSockets[url].readyState, _a));
        });
    }
    var subscriber = {
        setLastMessage: setLastMessage,
        setReadyState: setReadyState,
        options: options,
    };
    subscribers[url].push(subscriber);
    return function () {
        if (subscribers[url] !== undefined) {
            var index = subscribers[url].indexOf(subscriber);
            if (index === -1) {
                throw new Error('A subscriber that is no longer registered has attempted to unsubscribe');
            }
            if (subscribers[url].length === 1) {
                subscribers[url][0].setReadyState(function (prev) {
                    var _a;
                    return Object.assign({}, prev, (_a = {}, _a[url] = constants_1.READY_STATE_CLOSING, _a));
                });
                webSocketInstance.close();
            }
            else {
                subscribers[url].splice(index, 1);
            }
        }
    };
};


/***/ }),

/***/ "./node_modules/react-use-websocket/dist/lib/attach-listener.js":
/*!**********************************************************************!*\
  !*** ./node_modules/react-use-websocket/dist/lib/attach-listener.js ***!
  \**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var socket_io_1 = __webpack_require__(/*! ./socket-io */ "./node_modules/react-use-websocket/dist/lib/socket-io.js");
var constants_1 = __webpack_require__(/*! ./constants */ "./node_modules/react-use-websocket/dist/lib/constants.js");
var add_subscriber_1 = __webpack_require__(/*! ./add-subscriber */ "./node_modules/react-use-websocket/dist/lib/add-subscriber.js");
exports.attachListeners = function (webSocketInstance, url, setters, options, retry, retryCount) {
    var setLastMessage = setters.setLastMessage, setReadyState = setters.setReadyState;
    var interval;
    if (options.fromSocketIO) {
        interval = socket_io_1.setUpSocketIOPing(webSocketInstance);
    }
    if (options.share) {
        var removeSubscriber = add_subscriber_1.addSubscriber(webSocketInstance, url, {
            setLastMessage: setLastMessage,
            setReadyState: setReadyState,
        }, options);
        return removeSubscriber;
    }
    webSocketInstance.onmessage = function (message) {
        options.onMessage && options.onMessage(message);
        if (typeof options.filter === 'function' && options.filter(message) !== true) {
            return;
        }
        setLastMessage(message);
    };
    webSocketInstance.onopen = function (event) {
        options.onOpen && options.onOpen(event);
        retryCount.current = 0;
        setReadyState(function (prev) {
            var _a;
            return Object.assign({}, prev, (_a = {}, _a[url] = constants_1.READY_STATE_OPEN, _a));
        });
    };
    webSocketInstance.onclose = function (event) {
        options.onClose && options.onClose(event);
        setReadyState(function (prev) {
            var _a;
            return Object.assign({}, prev, (_a = {}, _a[url] = constants_1.READY_STATE_CLOSED, _a));
        });
    };
    webSocketInstance.onerror = function (error) {
        options.onError && options.onError(error);
        if (options.retryOnError) {
            if (retryCount.current < constants_1.RETRY_LIMIT) {
                retryCount.current++;
                retry();
            }
        }
    };
    return function () {
        setReadyState(function (prev) {
            var _a;
            return Object.assign({}, prev, (_a = {}, _a[url] = constants_1.READY_STATE_CLOSING, _a));
        });
        webSocketInstance.close();
        if (interval)
            clearInterval(interval);
    };
};


/***/ }),

/***/ "./node_modules/react-use-websocket/dist/lib/constants.js":
/*!****************************************************************!*\
  !*** ./node_modules/react-use-websocket/dist/lib/constants.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var MILLISECONDS = 1;
var SECONDS = 1000 * MILLISECONDS;
exports.sharedWebSockets = {};
exports.DEFAULT_OPTIONS = {};
exports.READY_STATE_CONNECTING = 0;
exports.READY_STATE_OPEN = 1;
exports.READY_STATE_CLOSING = 2;
exports.READY_STATE_CLOSED = 3;
exports.SOCKET_IO_PING_INTERVAL = 25 * SECONDS;
exports.SOCKET_IO_PATH = '/socket.io/?EIO=3&transport=websocket';
exports.SOCKET_IO_PING_CODE = 2;
exports.RETRY_LIMIT = 2;


/***/ }),

/***/ "./node_modules/react-use-websocket/dist/lib/create-or-join.js":
/*!*********************************************************************!*\
  !*** ./node_modules/react-use-websocket/dist/lib/create-or-join.js ***!
  \*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var globals_1 = __webpack_require__(/*! ./globals */ "./node_modules/react-use-websocket/dist/lib/globals.js");
var constants_1 = __webpack_require__(/*! ./constants */ "./node_modules/react-use-websocket/dist/lib/constants.js");
exports.createOrJoinSocket = function (webSocketRef, url, setReadyState, options) {
    if (options.share) {
        if (globals_1.sharedWebSockets[url] === undefined) {
            setReadyState(function (prev) {
                var _a;
                return Object.assign({}, prev, (_a = {}, _a[url] = constants_1.READY_STATE_CONNECTING, _a));
            });
            globals_1.sharedWebSockets[url] = new WebSocket(url);
        }
        webSocketRef.current = globals_1.sharedWebSockets[url];
    }
    else {
        setReadyState(function (prev) {
            var _a;
            return Object.assign({}, prev, (_a = {}, _a[url] = constants_1.READY_STATE_CONNECTING, _a));
        });
        webSocketRef.current = new WebSocket(url);
    }
};


/***/ }),

/***/ "./node_modules/react-use-websocket/dist/lib/globals.js":
/*!**************************************************************!*\
  !*** ./node_modules/react-use-websocket/dist/lib/globals.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.sharedWebSockets = {};


/***/ }),

/***/ "./node_modules/react-use-websocket/dist/lib/socket-io.js":
/*!****************************************************************!*\
  !*** ./node_modules/react-use-websocket/dist/lib/socket-io.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var constants_1 = __webpack_require__(/*! ./constants */ "./node_modules/react-use-websocket/dist/lib/constants.js");
exports.parseSocketIOUrl = function (url) {
    if (url) {
        var isSecure = /^https|wss/.test(url);
        var strippedProtocol = url.replace(/^(https?|wss?)(:\/\/)?/, '');
        var removedFinalBackSlack = strippedProtocol.replace(/\/$/, '');
        var protocol = isSecure ? 'wss' : 'ws';
        return protocol + "://" + removedFinalBackSlack + constants_1.SOCKET_IO_PATH;
    }
    else if (url === '') {
        var isSecure = /^https/.test(window.location.protocol);
        var protocol = isSecure ? 'wss' : 'ws';
        var port = window.location.port ? ":" + window.location.port : '';
        return protocol + "://" + window.location.hostname + port + constants_1.SOCKET_IO_PATH;
    }
    return url;
};
exports.setUpSocketIOPing = function (socketInstance) {
    var ping = function () { return socketInstance.send(constants_1.SOCKET_IO_PING_CODE); };
    return setInterval(ping, constants_1.SOCKET_IO_PING_INTERVAL);
};


/***/ }),

/***/ "./node_modules/react-use-websocket/dist/lib/use-socket-io.js":
/*!********************************************************************!*\
  !*** ./node_modules/react-use-websocket/dist/lib/use-socket-io.js ***!
  \********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = __webpack_require__(/*! react */ "react");
var use_websocket_1 = __webpack_require__(/*! ./use-websocket */ "./node_modules/react-use-websocket/dist/lib/use-websocket.js");
var constants_1 = __webpack_require__(/*! ./constants */ "./node_modules/react-use-websocket/dist/lib/constants.js");
var emptyEvent = {
    type: 'empty',
    payload: null,
};
var getSocketData = function (event) {
    if (!event || !event.data) {
        return emptyEvent;
    }
    var match = event.data.match(/\[.*]/);
    if (!match) {
        return emptyEvent;
    }
    var data = JSON.parse(match);
    if (!Array.isArray(data) || !data[1]) {
        return emptyEvent;
    }
    return {
        type: data[0],
        payload: data[1],
    };
};
exports.useSocketIO = function (url, options) {
    if (options === void 0) { options = constants_1.DEFAULT_OPTIONS; }
    var optionsWithSocketIO = react_1.useMemo(function () { return (__assign({}, options, { fromSocketIO: true })); }, []);
    var _a = use_websocket_1.useWebSocket(url, optionsWithSocketIO), sendMessage = _a[0], lastMessage = _a[1], readyStateFromUrl = _a[2];
    return [
        sendMessage,
        react_1.useMemo(function () { return getSocketData(lastMessage); }, [lastMessage]),
        readyStateFromUrl,
    ];
};


/***/ }),

/***/ "./node_modules/react-use-websocket/dist/lib/use-websocket.js":
/*!********************************************************************!*\
  !*** ./node_modules/react-use-websocket/dist/lib/use-websocket.js ***!
  \********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = __webpack_require__(/*! react */ "react");
var socket_io_1 = __webpack_require__(/*! ./socket-io */ "./node_modules/react-use-websocket/dist/lib/socket-io.js");
var attach_listener_1 = __webpack_require__(/*! ./attach-listener */ "./node_modules/react-use-websocket/dist/lib/attach-listener.js");
var constants_1 = __webpack_require__(/*! ./constants */ "./node_modules/react-use-websocket/dist/lib/constants.js");
var create_or_join_1 = __webpack_require__(/*! ./create-or-join */ "./node_modules/react-use-websocket/dist/lib/create-or-join.js");
var ReadyStateEnum;
(function (ReadyStateEnum) {
    ReadyStateEnum[ReadyStateEnum["Connecting"] = 0] = "Connecting";
    ReadyStateEnum[ReadyStateEnum["Open"] = 1] = "Open";
    ReadyStateEnum[ReadyStateEnum["Closing"] = 2] = "Closing";
    ReadyStateEnum[ReadyStateEnum["Closed"] = 3] = "Closed";
})(ReadyStateEnum = exports.ReadyStateEnum || (exports.ReadyStateEnum = {}));
exports.useWebSocket = function (url, options) {
    if (options === void 0) { options = constants_1.DEFAULT_OPTIONS; }
    var _a = react_1.useState(null), lastMessage = _a[0], setLastMessage = _a[1];
    var _b = react_1.useState({}), readyState = _b[0], setReadyState = _b[1];
    var webSocketRef = react_1.useRef(null);
    var retryCount = react_1.useRef(0);
    var staticOptionsCheck = react_1.useRef(null);
    var convertedUrl = react_1.useMemo(function () {
        if (options.fromSocketIO) {
            return socket_io_1.parseSocketIOUrl(url);
        }
        return url;
    }, [url]);
    var sendMessage = react_1.useCallback(function (message) {
        webSocketRef.current && webSocketRef.current.send(message);
    }, []);
    react_1.useEffect(function () {
        var removeListeners;
        var start = function () {
            create_or_join_1.createOrJoinSocket(webSocketRef, convertedUrl, setReadyState, options);
            removeListeners = attach_listener_1.attachListeners(webSocketRef.current, convertedUrl, {
                setLastMessage: setLastMessage,
                setReadyState: setReadyState,
            }, options, start, retryCount);
        };
        start();
        return removeListeners;
    }, [convertedUrl]);
    react_1.useEffect(function () {
        if (staticOptionsCheck.current)
            throw new Error('The options object you pass must be static');
        staticOptionsCheck.current = true;
    }, [options]);
    var readyStateFromUrl = readyState[convertedUrl] !== undefined ? readyState[convertedUrl] : constants_1.READY_STATE_CONNECTING;
    return [sendMessage, lastMessage, readyStateFromUrl];
};


/***/ }),

/***/ "./node_modules/reconnectingwebsocket/reconnecting-websocket.js":
/*!**********************************************************************!*\
  !*** ./node_modules/reconnectingwebsocket/reconnecting-websocket.js ***!
  \**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// MIT License:
//
// Copyright (c) 2010-2012, Joe Walnes
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

/**
 * This behaves like a WebSocket in every way, except if it fails to connect,
 * or it gets disconnected, it will repeatedly poll until it successfully connects
 * again.
 *
 * It is API compatible, so when you have:
 *   ws = new WebSocket('ws://....');
 * you can replace with:
 *   ws = new ReconnectingWebSocket('ws://....');
 *
 * The event stream will typically look like:
 *  onconnecting
 *  onopen
 *  onmessage
 *  onmessage
 *  onclose // lost connection
 *  onconnecting
 *  onopen  // sometime later...
 *  onmessage
 *  onmessage
 *  etc...
 *
 * It is API compatible with the standard WebSocket API, apart from the following members:
 *
 * - `bufferedAmount`
 * - `extensions`
 * - `binaryType`
 *
 * Latest version: https://github.com/joewalnes/reconnecting-websocket/
 * - Joe Walnes
 *
 * Syntax
 * ======
 * var socket = new ReconnectingWebSocket(url, protocols, options);
 *
 * Parameters
 * ==========
 * url - The url you are connecting to.
 * protocols - Optional string or array of protocols.
 * options - See below
 *
 * Options
 * =======
 * Options can either be passed upon instantiation or set after instantiation:
 *
 * var socket = new ReconnectingWebSocket(url, null, { debug: true, reconnectInterval: 4000 });
 *
 * or
 *
 * var socket = new ReconnectingWebSocket(url);
 * socket.debug = true;
 * socket.reconnectInterval = 4000;
 *
 * debug
 * - Whether this instance should log debug messages. Accepts true or false. Default: false.
 *
 * automaticOpen
 * - Whether or not the websocket should attempt to connect immediately upon instantiation. The socket can be manually opened or closed at any time using ws.open() and ws.close().
 *
 * reconnectInterval
 * - The number of milliseconds to delay before attempting to reconnect. Accepts integer. Default: 1000.
 *
 * maxReconnectInterval
 * - The maximum number of milliseconds to delay a reconnection attempt. Accepts integer. Default: 30000.
 *
 * reconnectDecay
 * - The rate of increase of the reconnect delay. Allows reconnect attempts to back off when problems persist. Accepts integer or float. Default: 1.5.
 *
 * timeoutInterval
 * - The maximum time in milliseconds to wait for a connection to succeed before closing and retrying. Accepts integer. Default: 2000.
 *
 */
(function (global, factory) {
    if (true) {
        !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
    } else {}
})(this, function () {

    if (!('WebSocket' in window)) {
        return;
    }

    function ReconnectingWebSocket(url, protocols, options) {

        // Default settings
        var settings = {

            /** Whether this instance should log debug messages. */
            debug: false,

            /** Whether or not the websocket should attempt to connect immediately upon instantiation. */
            automaticOpen: true,

            /** The number of milliseconds to delay before attempting to reconnect. */
            reconnectInterval: 1000,
            /** The maximum number of milliseconds to delay a reconnection attempt. */
            maxReconnectInterval: 30000,
            /** The rate of increase of the reconnect delay. Allows reconnect attempts to back off when problems persist. */
            reconnectDecay: 1.5,

            /** The maximum time in milliseconds to wait for a connection to succeed before closing and retrying. */
            timeoutInterval: 2000,

            /** The maximum number of reconnection attempts to make. Unlimited if null. */
            maxReconnectAttempts: null
        }
        if (!options) { options = {}; }

        // Overwrite and define settings with options if they exist.
        for (var key in settings) {
            if (typeof options[key] !== 'undefined') {
                this[key] = options[key];
            } else {
                this[key] = settings[key];
            }
        }

        // These should be treated as read-only properties

        /** The URL as resolved by the constructor. This is always an absolute URL. Read only. */
        this.url = url;

        /** The number of attempted reconnects since starting, or the last successful connection. Read only. */
        this.reconnectAttempts = 0;

        /**
         * The current state of the connection.
         * Can be one of: WebSocket.CONNECTING, WebSocket.OPEN, WebSocket.CLOSING, WebSocket.CLOSED
         * Read only.
         */
        this.readyState = WebSocket.CONNECTING;

        /**
         * A string indicating the name of the sub-protocol the server selected; this will be one of
         * the strings specified in the protocols parameter when creating the WebSocket object.
         * Read only.
         */
        this.protocol = null;

        // Private state variables

        var self = this;
        var ws;
        var forcedClose = false;
        var timedOut = false;
        var eventTarget = document.createElement('div');

        // Wire up "on*" properties as event handlers

        eventTarget.addEventListener('open',       function(event) { self.onopen(event); });
        eventTarget.addEventListener('close',      function(event) { self.onclose(event); });
        eventTarget.addEventListener('connecting', function(event) { self.onconnecting(event); });
        eventTarget.addEventListener('message',    function(event) { self.onmessage(event); });
        eventTarget.addEventListener('error',      function(event) { self.onerror(event); });

        // Expose the API required by EventTarget

        this.addEventListener = eventTarget.addEventListener.bind(eventTarget);
        this.removeEventListener = eventTarget.removeEventListener.bind(eventTarget);
        this.dispatchEvent = eventTarget.dispatchEvent.bind(eventTarget);

        /**
         * This function generates an event that is compatible with standard
         * compliant browsers and IE9 - IE11
         *
         * This will prevent the error:
         * Object doesn't support this action
         *
         * http://stackoverflow.com/questions/19345392/why-arent-my-parameters-getting-passed-through-to-a-dispatched-event/19345563#19345563
         * @param s String The name that the event should use
         * @param args Object an optional object that the event will use
         */
        function generateEvent(s, args) {
        	var evt = document.createEvent("CustomEvent");
        	evt.initCustomEvent(s, false, false, args);
        	return evt;
        };

        this.open = function (reconnectAttempt) {
            ws = new WebSocket(self.url, protocols || []);

            if (reconnectAttempt) {
                if (this.maxReconnectAttempts && this.reconnectAttempts > this.maxReconnectAttempts) {
                    return;
                }
            } else {
                eventTarget.dispatchEvent(generateEvent('connecting'));
                this.reconnectAttempts = 0;
            }

            if (self.debug || ReconnectingWebSocket.debugAll) {
                console.debug('ReconnectingWebSocket', 'attempt-connect', self.url);
            }

            var localWs = ws;
            var timeout = setTimeout(function() {
                if (self.debug || ReconnectingWebSocket.debugAll) {
                    console.debug('ReconnectingWebSocket', 'connection-timeout', self.url);
                }
                timedOut = true;
                localWs.close();
                timedOut = false;
            }, self.timeoutInterval);

            ws.onopen = function(event) {
                clearTimeout(timeout);
                if (self.debug || ReconnectingWebSocket.debugAll) {
                    console.debug('ReconnectingWebSocket', 'onopen', self.url);
                }
                self.protocol = ws.protocol;
                self.readyState = WebSocket.OPEN;
                self.reconnectAttempts = 0;
                var e = generateEvent('open');
                e.isReconnect = reconnectAttempt;
                reconnectAttempt = false;
                eventTarget.dispatchEvent(e);
            };

            ws.onclose = function(event) {
                clearTimeout(timeout);
                ws = null;
                if (forcedClose) {
                    self.readyState = WebSocket.CLOSED;
                    eventTarget.dispatchEvent(generateEvent('close'));
                } else {
                    self.readyState = WebSocket.CONNECTING;
                    var e = generateEvent('connecting');
                    e.code = event.code;
                    e.reason = event.reason;
                    e.wasClean = event.wasClean;
                    eventTarget.dispatchEvent(e);
                    if (!reconnectAttempt && !timedOut) {
                        if (self.debug || ReconnectingWebSocket.debugAll) {
                            console.debug('ReconnectingWebSocket', 'onclose', self.url);
                        }
                        eventTarget.dispatchEvent(generateEvent('close'));
                    }

                    var timeout = self.reconnectInterval * Math.pow(self.reconnectDecay, self.reconnectAttempts);
                    setTimeout(function() {
                        self.reconnectAttempts++;
                        self.open(true);
                    }, timeout > self.maxReconnectInterval ? self.maxReconnectInterval : timeout);
                }
            };
            ws.onmessage = function(event) {
                if (self.debug || ReconnectingWebSocket.debugAll) {
                    console.debug('ReconnectingWebSocket', 'onmessage', self.url, event.data);
                }
                var e = generateEvent('message');
                e.data = event.data;
                eventTarget.dispatchEvent(e);
            };
            ws.onerror = function(event) {
                if (self.debug || ReconnectingWebSocket.debugAll) {
                    console.debug('ReconnectingWebSocket', 'onerror', self.url, event);
                }
                eventTarget.dispatchEvent(generateEvent('error'));
            };
        }

        // Whether or not to create a websocket upon instantiation
        if (this.automaticOpen == true) {
            this.open(false);
        }

        /**
         * Transmits data to the server over the WebSocket connection.
         *
         * @param data a text string, ArrayBuffer or Blob to send to the server.
         */
        this.send = function(data) {
            if (ws) {
                if (self.debug || ReconnectingWebSocket.debugAll) {
                    console.debug('ReconnectingWebSocket', 'send', self.url, data);
                }
                return ws.send(data);
            } else {
                throw 'INVALID_STATE_ERR : Pausing to reconnect websocket';
            }
        };

        /**
         * Closes the WebSocket connection or connection attempt, if any.
         * If the connection is already CLOSED, this method does nothing.
         */
        this.close = function(code, reason) {
            // Default CLOSE_NORMAL code
            if (typeof code == 'undefined') {
                code = 1000;
            }
            forcedClose = true;
            if (ws) {
                ws.close(code, reason);
            }
        };

        /**
         * Additional public API method to refresh the connection if still open (close, re-open).
         * For example, if the app suspects bad data / missed heart beats, it can try to refresh.
         */
        this.refresh = function() {
            if (ws) {
                ws.close();
            }
        };
    }

    /**
     * An event listener to be called when the WebSocket connection's readyState changes to OPEN;
     * this indicates that the connection is ready to send and receive data.
     */
    ReconnectingWebSocket.prototype.onopen = function(event) {};
    /** An event listener to be called when the WebSocket connection's readyState changes to CLOSED. */
    ReconnectingWebSocket.prototype.onclose = function(event) {};
    /** An event listener to be called when a connection begins being attempted. */
    ReconnectingWebSocket.prototype.onconnecting = function(event) {};
    /** An event listener to be called when a message is received from the server. */
    ReconnectingWebSocket.prototype.onmessage = function(event) {};
    /** An event listener to be called when an error occurs. */
    ReconnectingWebSocket.prototype.onerror = function(event) {};

    /**
     * Whether all instances of ReconnectingWebSocket should log debug messages.
     * Setting this to true is the equivalent of setting all instances of ReconnectingWebSocket.debug to true.
     */
    ReconnectingWebSocket.debugAll = false;

    ReconnectingWebSocket.CONNECTING = WebSocket.CONNECTING;
    ReconnectingWebSocket.OPEN = WebSocket.OPEN;
    ReconnectingWebSocket.CLOSING = WebSocket.CLOSING;
    ReconnectingWebSocket.CLOSED = WebSocket.CLOSED;

    return ReconnectingWebSocket;
});


/***/ }),

/***/ "./node_modules/redux-logger/dist/redux-logger.js":
/*!********************************************************!*\
  !*** ./node_modules/redux-logger/dist/redux-logger.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global) {!function(e,t){ true?t(exports):undefined}(this,function(e){"use strict";function t(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function r(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,"path",{value:t,enumerable:!0})}function n(e,t,r){n.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:r,enumerable:!0})}function o(e,t){o.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function i(e,t){i.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function a(e,t,r){a.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:r,enumerable:!0})}function f(e,t,r){var n=e.slice((r||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,n),e}function u(e){var t="undefined"==typeof e?"undefined":N(e);return"object"!==t?t:e===Math?"math":null===e?"null":Array.isArray(e)?"array":"[object Date]"===Object.prototype.toString.call(e)?"date":"function"==typeof e.toString&&/^\/.*\//.test(e.toString())?"regexp":"object"}function l(e,t,r,c,s,d,p){s=s||[],p=p||[];var g=s.slice(0);if("undefined"!=typeof d){if(c){if("function"==typeof c&&c(g,d))return;if("object"===("undefined"==typeof c?"undefined":N(c))){if(c.prefilter&&c.prefilter(g,d))return;if(c.normalize){var h=c.normalize(g,d,e,t);h&&(e=h[0],t=h[1])}}}g.push(d)}"regexp"===u(e)&&"regexp"===u(t)&&(e=e.toString(),t=t.toString());var y="undefined"==typeof e?"undefined":N(e),v="undefined"==typeof t?"undefined":N(t),b="undefined"!==y||p&&p[p.length-1].lhs&&p[p.length-1].lhs.hasOwnProperty(d),m="undefined"!==v||p&&p[p.length-1].rhs&&p[p.length-1].rhs.hasOwnProperty(d);if(!b&&m)r(new o(g,t));else if(!m&&b)r(new i(g,e));else if(u(e)!==u(t))r(new n(g,e,t));else if("date"===u(e)&&e-t!==0)r(new n(g,e,t));else if("object"===y&&null!==e&&null!==t)if(p.filter(function(t){return t.lhs===e}).length)e!==t&&r(new n(g,e,t));else{if(p.push({lhs:e,rhs:t}),Array.isArray(e)){var w;e.length;for(w=0;w<e.length;w++)w>=t.length?r(new a(g,w,new i(void 0,e[w]))):l(e[w],t[w],r,c,g,w,p);for(;w<t.length;)r(new a(g,w,new o(void 0,t[w++])))}else{var x=Object.keys(e),S=Object.keys(t);x.forEach(function(n,o){var i=S.indexOf(n);i>=0?(l(e[n],t[n],r,c,g,n,p),S=f(S,i)):l(e[n],void 0,r,c,g,n,p)}),S.forEach(function(e){l(void 0,t[e],r,c,g,e,p)})}p.length=p.length-1}else e!==t&&("number"===y&&isNaN(e)&&isNaN(t)||r(new n(g,e,t)))}function c(e,t,r,n){return n=n||[],l(e,t,function(e){e&&n.push(e)},r),n.length?n:void 0}function s(e,t,r){if(r.path&&r.path.length){var n,o=e[t],i=r.path.length-1;for(n=0;n<i;n++)o=o[r.path[n]];switch(r.kind){case"A":s(o[r.path[n]],r.index,r.item);break;case"D":delete o[r.path[n]];break;case"E":case"N":o[r.path[n]]=r.rhs}}else switch(r.kind){case"A":s(e[t],r.index,r.item);break;case"D":e=f(e,t);break;case"E":case"N":e[t]=r.rhs}return e}function d(e,t,r){if(e&&t&&r&&r.kind){for(var n=e,o=-1,i=r.path?r.path.length-1:0;++o<i;)"undefined"==typeof n[r.path[o]]&&(n[r.path[o]]="number"==typeof r.path[o]?[]:{}),n=n[r.path[o]];switch(r.kind){case"A":s(r.path?n[r.path[o]]:n,r.index,r.item);break;case"D":delete n[r.path[o]];break;case"E":case"N":n[r.path[o]]=r.rhs}}}function p(e,t,r){if(r.path&&r.path.length){var n,o=e[t],i=r.path.length-1;for(n=0;n<i;n++)o=o[r.path[n]];switch(r.kind){case"A":p(o[r.path[n]],r.index,r.item);break;case"D":o[r.path[n]]=r.lhs;break;case"E":o[r.path[n]]=r.lhs;break;case"N":delete o[r.path[n]]}}else switch(r.kind){case"A":p(e[t],r.index,r.item);break;case"D":e[t]=r.lhs;break;case"E":e[t]=r.lhs;break;case"N":e=f(e,t)}return e}function g(e,t,r){if(e&&t&&r&&r.kind){var n,o,i=e;for(o=r.path.length-1,n=0;n<o;n++)"undefined"==typeof i[r.path[n]]&&(i[r.path[n]]={}),i=i[r.path[n]];switch(r.kind){case"A":p(i[r.path[n]],r.index,r.item);break;case"D":i[r.path[n]]=r.lhs;break;case"E":i[r.path[n]]=r.lhs;break;case"N":delete i[r.path[n]]}}}function h(e,t,r){if(e&&t){var n=function(n){r&&!r(e,t,n)||d(e,t,n)};l(e,t,n)}}function y(e){return"color: "+F[e].color+"; font-weight: bold"}function v(e){var t=e.kind,r=e.path,n=e.lhs,o=e.rhs,i=e.index,a=e.item;switch(t){case"E":return[r.join("."),n,"→",o];case"N":return[r.join("."),o];case"D":return[r.join(".")];case"A":return[r.join(".")+"["+i+"]",a];default:return[]}}function b(e,t,r,n){var o=c(e,t);try{n?r.groupCollapsed("diff"):r.group("diff")}catch(e){r.log("diff")}o?o.forEach(function(e){var t=e.kind,n=v(e);r.log.apply(r,["%c "+F[t].text,y(t)].concat(P(n)))}):r.log("—— no diff ——");try{r.groupEnd()}catch(e){r.log("—— diff end —— ")}}function m(e,t,r,n){switch("undefined"==typeof e?"undefined":N(e)){case"object":return"function"==typeof e[n]?e[n].apply(e,P(r)):e[n];case"function":return e(t);default:return e}}function w(e){var t=e.timestamp,r=e.duration;return function(e,n,o){var i=["action"];return i.push("%c"+String(e.type)),t&&i.push("%c@ "+n),r&&i.push("%c(in "+o.toFixed(2)+" ms)"),i.join(" ")}}function x(e,t){var r=t.logger,n=t.actionTransformer,o=t.titleFormatter,i=void 0===o?w(t):o,a=t.collapsed,f=t.colors,u=t.level,l=t.diff,c="undefined"==typeof t.titleFormatter;e.forEach(function(o,s){var d=o.started,p=o.startedTime,g=o.action,h=o.prevState,y=o.error,v=o.took,w=o.nextState,x=e[s+1];x&&(w=x.prevState,v=x.started-d);var S=n(g),k="function"==typeof a?a(function(){return w},g,o):a,j=D(p),E=f.title?"color: "+f.title(S)+";":"",A=["color: gray; font-weight: lighter;"];A.push(E),t.timestamp&&A.push("color: gray; font-weight: lighter;"),t.duration&&A.push("color: gray; font-weight: lighter;");var O=i(S,j,v);try{k?f.title&&c?r.groupCollapsed.apply(r,["%c "+O].concat(A)):r.groupCollapsed(O):f.title&&c?r.group.apply(r,["%c "+O].concat(A)):r.group(O)}catch(e){r.log(O)}var N=m(u,S,[h],"prevState"),P=m(u,S,[S],"action"),C=m(u,S,[y,h],"error"),F=m(u,S,[w],"nextState");if(N)if(f.prevState){var L="color: "+f.prevState(h)+"; font-weight: bold";r[N]("%c prev state",L,h)}else r[N]("prev state",h);if(P)if(f.action){var T="color: "+f.action(S)+"; font-weight: bold";r[P]("%c action    ",T,S)}else r[P]("action    ",S);if(y&&C)if(f.error){var M="color: "+f.error(y,h)+"; font-weight: bold;";r[C]("%c error     ",M,y)}else r[C]("error     ",y);if(F)if(f.nextState){var _="color: "+f.nextState(w)+"; font-weight: bold";r[F]("%c next state",_,w)}else r[F]("next state",w);l&&b(h,w,r,k);try{r.groupEnd()}catch(e){r.log("—— log end ——")}})}function S(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},L,e),r=t.logger,n=t.stateTransformer,o=t.errorTransformer,i=t.predicate,a=t.logErrors,f=t.diffPredicate;if("undefined"==typeof r)return function(){return function(e){return function(t){return e(t)}}};if(e.getState&&e.dispatch)return console.error("[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware:\n// Logger with default options\nimport { logger } from 'redux-logger'\nconst store = createStore(\n  reducer,\n  applyMiddleware(logger)\n)\n// Or you can create your own logger with custom options http://bit.ly/redux-logger-options\nimport createLogger from 'redux-logger'\nconst logger = createLogger({\n  // ...options\n});\nconst store = createStore(\n  reducer,\n  applyMiddleware(logger)\n)\n"),function(){return function(e){return function(t){return e(t)}}};var u=[];return function(e){var r=e.getState;return function(e){return function(l){if("function"==typeof i&&!i(r,l))return e(l);var c={};u.push(c),c.started=O.now(),c.startedTime=new Date,c.prevState=n(r()),c.action=l;var s=void 0;if(a)try{s=e(l)}catch(e){c.error=o(e)}else s=e(l);c.took=O.now()-c.started,c.nextState=n(r());var d=t.diff&&"function"==typeof f?f(r,l):t.diff;if(x(u,Object.assign({},t,{diff:d})),u.length=0,c.error)throw c.error;return s}}}}var k,j,E=function(e,t){return new Array(t+1).join(e)},A=function(e,t){return E("0",t-e.toString().length)+e},D=function(e){return A(e.getHours(),2)+":"+A(e.getMinutes(),2)+":"+A(e.getSeconds(),2)+"."+A(e.getMilliseconds(),3)},O="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance:Date,N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},C=[];k="object"===("undefined"==typeof global?"undefined":N(global))&&global?global:"undefined"!=typeof window?window:{},j=k.DeepDiff,j&&C.push(function(){"undefined"!=typeof j&&k.DeepDiff===c&&(k.DeepDiff=j,j=void 0)}),t(n,r),t(o,r),t(i,r),t(a,r),Object.defineProperties(c,{diff:{value:c,enumerable:!0},observableDiff:{value:l,enumerable:!0},applyDiff:{value:h,enumerable:!0},applyChange:{value:d,enumerable:!0},revertChange:{value:g,enumerable:!0},isConflict:{value:function(){return"undefined"!=typeof j},enumerable:!0},noConflict:{value:function(){return C&&(C.forEach(function(e){e()}),C=null),c},enumerable:!0}});var F={E:{color:"#2196F3",text:"CHANGED:"},N:{color:"#4CAF50",text:"ADDED:"},D:{color:"#F44336",text:"DELETED:"},A:{color:"#2196F3",text:"ARRAY:"}},L={level:"log",logger:console,logErrors:!0,collapsed:void 0,predicate:void 0,duration:!1,timestamp:!0,stateTransformer:function(e){return e},actionTransformer:function(e){return e},errorTransformer:function(e){return e},colors:{title:function(){return"inherit"},prevState:function(){return"#9E9E9E"},action:function(){return"#03A9F4"},nextState:function(){return"#4CAF50"},error:function(){return"#F20404"}},diff:!1,diffPredicate:void 0,transformer:void 0},T=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.dispatch,r=e.getState;return"function"==typeof t||"function"==typeof r?S()({dispatch:t,getState:r}):void console.error("\n[redux-logger v3] BREAKING CHANGE\n[redux-logger v3] Since 3.0.0 redux-logger exports by default logger with default settings.\n[redux-logger v3] Change\n[redux-logger v3] import createLogger from 'redux-logger'\n[redux-logger v3] to\n[redux-logger v3] import { createLogger } from 'redux-logger'\n")};e.defaults=L,e.createLogger=S,e.logger=T,e.default=T,Object.defineProperty(e,"__esModule",{value:!0})});

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

/***/ }),

/***/ "./node_modules/redux/es/redux.js":
/*!****************************************!*\
  !*** ./node_modules/redux/es/redux.js ***!
  \****************************************/
/*! exports provided: __DO_NOT_USE__ActionTypes, applyMiddleware, bindActionCreators, combineReducers, compose, createStore */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__DO_NOT_USE__ActionTypes", function() { return ActionTypes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyMiddleware", function() { return applyMiddleware; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindActionCreators", function() { return bindActionCreators; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return combineReducers; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return compose; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return createStore; });
/* harmony import */ var symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! symbol-observable */ "./node_modules/symbol-observable/es/index.js");


/**
 * These are private action types reserved by Redux.
 * For any unknown actions, you must return the current state.
 * If the current state is undefined, you must return the initial state.
 * Do not reference these action types directly in your code.
 */
var randomString = function randomString() {
  return Math.random().toString(36).substring(7).split('').join('.');
};

var ActionTypes = {
  INIT: "@@redux/INIT" + randomString(),
  REPLACE: "@@redux/REPLACE" + randomString(),
  PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
    return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
  }
};

/**
 * @param {any} obj The object to inspect.
 * @returns {boolean} True if the argument appears to be a plain object.
 */
function isPlainObject(obj) {
  if (typeof obj !== 'object' || obj === null) return false;
  var proto = obj;

  while (Object.getPrototypeOf(proto) !== null) {
    proto = Object.getPrototypeOf(proto);
  }

  return Object.getPrototypeOf(obj) === proto;
}

/**
 * Creates a Redux store that holds the state tree.
 * The only way to change the data in the store is to call `dispatch()` on it.
 *
 * There should only be a single store in your app. To specify how different
 * parts of the state tree respond to actions, you may combine several reducers
 * into a single reducer function by using `combineReducers`.
 *
 * @param {Function} reducer A function that returns the next state tree, given
 * the current state tree and the action to handle.
 *
 * @param {any} [preloadedState] The initial state. You may optionally specify it
 * to hydrate the state from the server in universal apps, or to restore a
 * previously serialized user session.
 * If you use `combineReducers` to produce the root reducer function, this must be
 * an object with the same shape as `combineReducers` keys.
 *
 * @param {Function} [enhancer] The store enhancer. You may optionally specify it
 * to enhance the store with third-party capabilities such as middleware,
 * time travel, persistence, etc. The only store enhancer that ships with Redux
 * is `applyMiddleware()`.
 *
 * @returns {Store} A Redux store that lets you read the state, dispatch actions
 * and subscribe to changes.
 */

function createStore(reducer, preloadedState, enhancer) {
  var _ref2;

  if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {
    throw new Error('It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function.');
  }

  if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
    enhancer = preloadedState;
    preloadedState = undefined;
  }

  if (typeof enhancer !== 'undefined') {
    if (typeof enhancer !== 'function') {
      throw new Error('Expected the enhancer to be a function.');
    }

    return enhancer(createStore)(reducer, preloadedState);
  }

  if (typeof reducer !== 'function') {
    throw new Error('Expected the reducer to be a function.');
  }

  var currentReducer = reducer;
  var currentState = preloadedState;
  var currentListeners = [];
  var nextListeners = currentListeners;
  var isDispatching = false;
  /**
   * This makes a shallow copy of currentListeners so we can use
   * nextListeners as a temporary list while dispatching.
   *
   * This prevents any bugs around consumers calling
   * subscribe/unsubscribe in the middle of a dispatch.
   */

  function ensureCanMutateNextListeners() {
    if (nextListeners === currentListeners) {
      nextListeners = currentListeners.slice();
    }
  }
  /**
   * Reads the state tree managed by the store.
   *
   * @returns {any} The current state tree of your application.
   */


  function getState() {
    if (isDispatching) {
      throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');
    }

    return currentState;
  }
  /**
   * Adds a change listener. It will be called any time an action is dispatched,
   * and some part of the state tree may potentially have changed. You may then
   * call `getState()` to read the current state tree inside the callback.
   *
   * You may call `dispatch()` from a change listener, with the following
   * caveats:
   *
   * 1. The subscriptions are snapshotted just before every `dispatch()` call.
   * If you subscribe or unsubscribe while the listeners are being invoked, this
   * will not have any effect on the `dispatch()` that is currently in progress.
   * However, the next `dispatch()` call, whether nested or not, will use a more
   * recent snapshot of the subscription list.
   *
   * 2. The listener should not expect to see all state changes, as the state
   * might have been updated multiple times during a nested `dispatch()` before
   * the listener is called. It is, however, guaranteed that all subscribers
   * registered before the `dispatch()` started will be called with the latest
   * state by the time it exits.
   *
   * @param {Function} listener A callback to be invoked on every dispatch.
   * @returns {Function} A function to remove this change listener.
   */


  function subscribe(listener) {
    if (typeof listener !== 'function') {
      throw new Error('Expected the listener to be a function.');
    }

    if (isDispatching) {
      throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');
    }

    var isSubscribed = true;
    ensureCanMutateNextListeners();
    nextListeners.push(listener);
    return function unsubscribe() {
      if (!isSubscribed) {
        return;
      }

      if (isDispatching) {
        throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');
      }

      isSubscribed = false;
      ensureCanMutateNextListeners();
      var index = nextListeners.indexOf(listener);
      nextListeners.splice(index, 1);
    };
  }
  /**
   * Dispatches an action. It is the only way to trigger a state change.
   *
   * The `reducer` function, used to create the store, will be called with the
   * current state tree and the given `action`. Its return value will
   * be considered the **next** state of the tree, and the change listeners
   * will be notified.
   *
   * The base implementation only supports plain object actions. If you want to
   * dispatch a Promise, an Observable, a thunk, or something else, you need to
   * wrap your store creating function into the corresponding middleware. For
   * example, see the documentation for the `redux-thunk` package. Even the
   * middleware will eventually dispatch plain object actions using this method.
   *
   * @param {Object} action A plain object representing “what changed”. It is
   * a good idea to keep actions serializable so you can record and replay user
   * sessions, or use the time travelling `redux-devtools`. An action must have
   * a `type` property which may not be `undefined`. It is a good idea to use
   * string constants for action types.
   *
   * @returns {Object} For convenience, the same action object you dispatched.
   *
   * Note that, if you use a custom middleware, it may wrap `dispatch()` to
   * return something else (for example, a Promise you can await).
   */


  function dispatch(action) {
    if (!isPlainObject(action)) {
      throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
    }

    if (typeof action.type === 'undefined') {
      throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
    }

    if (isDispatching) {
      throw new Error('Reducers may not dispatch actions.');
    }

    try {
      isDispatching = true;
      currentState = currentReducer(currentState, action);
    } finally {
      isDispatching = false;
    }

    var listeners = currentListeners = nextListeners;

    for (var i = 0; i < listeners.length; i++) {
      var listener = listeners[i];
      listener();
    }

    return action;
  }
  /**
   * Replaces the reducer currently used by the store to calculate the state.
   *
   * You might need this if your app implements code splitting and you want to
   * load some of the reducers dynamically. You might also need this if you
   * implement a hot reloading mechanism for Redux.
   *
   * @param {Function} nextReducer The reducer for the store to use instead.
   * @returns {void}
   */


  function replaceReducer(nextReducer) {
    if (typeof nextReducer !== 'function') {
      throw new Error('Expected the nextReducer to be a function.');
    }

    currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.
    // Any reducers that existed in both the new and old rootReducer
    // will receive the previous state. This effectively populates
    // the new state tree with any relevant data from the old one.

    dispatch({
      type: ActionTypes.REPLACE
    });
  }
  /**
   * Interoperability point for observable/reactive libraries.
   * @returns {observable} A minimal observable of state changes.
   * For more information, see the observable proposal:
   * https://github.com/tc39/proposal-observable
   */


  function observable() {
    var _ref;

    var outerSubscribe = subscribe;
    return _ref = {
      /**
       * The minimal observable subscription method.
       * @param {Object} observer Any object that can be used as an observer.
       * The observer object should have a `next` method.
       * @returns {subscription} An object with an `unsubscribe` method that can
       * be used to unsubscribe the observable from the store, and prevent further
       * emission of values from the observable.
       */
      subscribe: function subscribe(observer) {
        if (typeof observer !== 'object' || observer === null) {
          throw new TypeError('Expected the observer to be an object.');
        }

        function observeState() {
          if (observer.next) {
            observer.next(getState());
          }
        }

        observeState();
        var unsubscribe = outerSubscribe(observeState);
        return {
          unsubscribe: unsubscribe
        };
      }
    }, _ref[symbol_observable__WEBPACK_IMPORTED_MODULE_0__["default"]] = function () {
      return this;
    }, _ref;
  } // When a store is created, an "INIT" action is dispatched so that every
  // reducer returns their initial state. This effectively populates
  // the initial state tree.


  dispatch({
    type: ActionTypes.INIT
  });
  return _ref2 = {
    dispatch: dispatch,
    subscribe: subscribe,
    getState: getState,
    replaceReducer: replaceReducer
  }, _ref2[symbol_observable__WEBPACK_IMPORTED_MODULE_0__["default"]] = observable, _ref2;
}

/**
 * Prints a warning in the console if it exists.
 *
 * @param {String} message The warning message.
 * @returns {void}
 */
function warning(message) {
  /* eslint-disable no-console */
  if (typeof console !== 'undefined' && typeof console.error === 'function') {
    console.error(message);
  }
  /* eslint-enable no-console */


  try {
    // This error was thrown as a convenience so that if you enable
    // "break on all exceptions" in your console,
    // it would pause the execution at this line.
    throw new Error(message);
  } catch (e) {} // eslint-disable-line no-empty

}

function getUndefinedStateErrorMessage(key, action) {
  var actionType = action && action.type;
  var actionDescription = actionType && "action \"" + String(actionType) + "\"" || 'an action';
  return "Given " + actionDescription + ", reducer \"" + key + "\" returned undefined. " + "To ignore an action, you must explicitly return the previous state. " + "If you want this reducer to hold no value, you can return null instead of undefined.";
}

function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
  var reducerKeys = Object.keys(reducers);
  var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';

  if (reducerKeys.length === 0) {
    return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
  }

  if (!isPlainObject(inputState)) {
    return "The " + argumentName + " has unexpected type of \"" + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\"");
  }

  var unexpectedKeys = Object.keys(inputState).filter(function (key) {
    return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
  });
  unexpectedKeys.forEach(function (key) {
    unexpectedKeyCache[key] = true;
  });
  if (action && action.type === ActionTypes.REPLACE) return;

  if (unexpectedKeys.length > 0) {
    return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored.");
  }
}

function assertReducerShape(reducers) {
  Object.keys(reducers).forEach(function (key) {
    var reducer = reducers[key];
    var initialState = reducer(undefined, {
      type: ActionTypes.INIT
    });

    if (typeof initialState === 'undefined') {
      throw new Error("Reducer \"" + key + "\" returned undefined during initialization. " + "If the state passed to the reducer is undefined, you must " + "explicitly return the initial state. The initial state may " + "not be undefined. If you don't want to set a value for this reducer, " + "you can use null instead of undefined.");
    }

    if (typeof reducer(undefined, {
      type: ActionTypes.PROBE_UNKNOWN_ACTION()
    }) === 'undefined') {
      throw new Error("Reducer \"" + key + "\" returned undefined when probed with a random type. " + ("Don't try to handle " + ActionTypes.INIT + " or other actions in \"redux/*\" ") + "namespace. They are considered private. Instead, you must return the " + "current state for any unknown actions, unless it is undefined, " + "in which case you must return the initial state, regardless of the " + "action type. The initial state may not be undefined, but can be null.");
    }
  });
}
/**
 * Turns an object whose values are different reducer functions, into a single
 * reducer function. It will call every child reducer, and gather their results
 * into a single state object, whose keys correspond to the keys of the passed
 * reducer functions.
 *
 * @param {Object} reducers An object whose values correspond to different
 * reducer functions that need to be combined into one. One handy way to obtain
 * it is to use ES6 `import * as reducers` syntax. The reducers may never return
 * undefined for any action. Instead, they should return their initial state
 * if the state passed to them was undefined, and the current state for any
 * unrecognized action.
 *
 * @returns {Function} A reducer function that invokes every reducer inside the
 * passed object, and builds a state object with the same shape.
 */


function combineReducers(reducers) {
  var reducerKeys = Object.keys(reducers);
  var finalReducers = {};

  for (var i = 0; i < reducerKeys.length; i++) {
    var key = reducerKeys[i];

    if (true) {
      if (typeof reducers[key] === 'undefined') {
        warning("No reducer provided for key \"" + key + "\"");
      }
    }

    if (typeof reducers[key] === 'function') {
      finalReducers[key] = reducers[key];
    }
  }

  var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same
  // keys multiple times.

  var unexpectedKeyCache;

  if (true) {
    unexpectedKeyCache = {};
  }

  var shapeAssertionError;

  try {
    assertReducerShape(finalReducers);
  } catch (e) {
    shapeAssertionError = e;
  }

  return function combination(state, action) {
    if (state === void 0) {
      state = {};
    }

    if (shapeAssertionError) {
      throw shapeAssertionError;
    }

    if (true) {
      var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);

      if (warningMessage) {
        warning(warningMessage);
      }
    }

    var hasChanged = false;
    var nextState = {};

    for (var _i = 0; _i < finalReducerKeys.length; _i++) {
      var _key = finalReducerKeys[_i];
      var reducer = finalReducers[_key];
      var previousStateForKey = state[_key];
      var nextStateForKey = reducer(previousStateForKey, action);

      if (typeof nextStateForKey === 'undefined') {
        var errorMessage = getUndefinedStateErrorMessage(_key, action);
        throw new Error(errorMessage);
      }

      nextState[_key] = nextStateForKey;
      hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
    }

    return hasChanged ? nextState : state;
  };
}

function bindActionCreator(actionCreator, dispatch) {
  return function () {
    return dispatch(actionCreator.apply(this, arguments));
  };
}
/**
 * Turns an object whose values are action creators, into an object with the
 * same keys, but with every function wrapped into a `dispatch` call so they
 * may be invoked directly. This is just a convenience method, as you can call
 * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
 *
 * For convenience, you can also pass an action creator as the first argument,
 * and get a dispatch wrapped function in return.
 *
 * @param {Function|Object} actionCreators An object whose values are action
 * creator functions. One handy way to obtain it is to use ES6 `import * as`
 * syntax. You may also pass a single function.
 *
 * @param {Function} dispatch The `dispatch` function available on your Redux
 * store.
 *
 * @returns {Function|Object} The object mimicking the original object, but with
 * every action creator wrapped into the `dispatch` call. If you passed a
 * function as `actionCreators`, the return value will also be a single
 * function.
 */


function bindActionCreators(actionCreators, dispatch) {
  if (typeof actionCreators === 'function') {
    return bindActionCreator(actionCreators, dispatch);
  }

  if (typeof actionCreators !== 'object' || actionCreators === null) {
    throw new Error("bindActionCreators expected an object or a function, instead received " + (actionCreators === null ? 'null' : typeof actionCreators) + ". " + "Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?");
  }

  var boundActionCreators = {};

  for (var key in actionCreators) {
    var actionCreator = actionCreators[key];

    if (typeof actionCreator === 'function') {
      boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
    }
  }

  return boundActionCreators;
}

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 ownKeys(object, enumerableOnly) {
  var keys = Object.keys(object);

  if (Object.getOwnPropertySymbols) {
    keys.push.apply(keys, Object.getOwnPropertySymbols(object));
  }

  if (enumerableOnly) keys = keys.filter(function (sym) {
    return Object.getOwnPropertyDescriptor(object, sym).enumerable;
  });
  return keys;
}

function _objectSpread2(target) {
  for (var i = 1; i < arguments.length; i++) {
    var source = arguments[i] != null ? arguments[i] : {};

    if (i % 2) {
      ownKeys(source, true).forEach(function (key) {
        _defineProperty(target, key, source[key]);
      });
    } else if (Object.getOwnPropertyDescriptors) {
      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
    } else {
      ownKeys(source).forEach(function (key) {
        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
      });
    }
  }

  return target;
}

/**
 * Composes single-argument functions from right to left. The rightmost
 * function can take multiple arguments as it provides the signature for
 * the resulting composite function.
 *
 * @param {...Function} funcs The functions to compose.
 * @returns {Function} A function obtained by composing the argument functions
 * from right to left. For example, compose(f, g, h) is identical to doing
 * (...args) => f(g(h(...args))).
 */
function compose() {
  for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
    funcs[_key] = arguments[_key];
  }

  if (funcs.length === 0) {
    return function (arg) {
      return arg;
    };
  }

  if (funcs.length === 1) {
    return funcs[0];
  }

  return funcs.reduce(function (a, b) {
    return function () {
      return a(b.apply(void 0, arguments));
    };
  });
}

/**
 * Creates a store enhancer that applies middleware to the dispatch method
 * of the Redux store. This is handy for a variety of tasks, such as expressing
 * asynchronous actions in a concise manner, or logging every action payload.
 *
 * See `redux-thunk` package as an example of the Redux middleware.
 *
 * Because middleware is potentially asynchronous, this should be the first
 * store enhancer in the composition chain.
 *
 * Note that each middleware will be given the `dispatch` and `getState` functions
 * as named arguments.
 *
 * @param {...Function} middlewares The middleware chain to be applied.
 * @returns {Function} A store enhancer applying the middleware.
 */

function applyMiddleware() {
  for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
    middlewares[_key] = arguments[_key];
  }

  return function (createStore) {
    return function () {
      var store = createStore.apply(void 0, arguments);

      var _dispatch = function dispatch() {
        throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');
      };

      var middlewareAPI = {
        getState: store.getState,
        dispatch: function dispatch() {
          return _dispatch.apply(void 0, arguments);
        }
      };
      var chain = middlewares.map(function (middleware) {
        return middleware(middlewareAPI);
      });
      _dispatch = compose.apply(void 0, chain)(store.dispatch);
      return _objectSpread2({}, store, {
        dispatch: _dispatch
      });
    };
  };
}

/*
 * This is a dummy function to check if the function name has been altered by minification.
 * If the function has been minified and NODE_ENV !== 'production', warn the user.
 */

function isCrushed() {}

if ( true && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
  warning('You are currently using minified code outside of NODE_ENV === "production". ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' + 'to ensure you have the correct code for your production build.');
}




/***/ }),

/***/ "./node_modules/shallow-equal/objects/index.js":
/*!*****************************************************!*\
  !*** ./node_modules/shallow-equal/objects/index.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


function shallowEqualObjects(objA, objB) {
  if (objA === objB) {
    return true;
  }

  if (!objA || !objB) {
    return false;
  }

  var aKeys = Object.keys(objA);
  var bKeys = Object.keys(objB);
  var len = aKeys.length;

  if (bKeys.length !== len) {
    return false;
  }

  for (var i = 0; i < len; i++) {
    var key = aKeys[i];

    if (objA[key] !== objB[key]) {
      return false;
    }
  }

  return true;
}

module.exports = shallowEqualObjects;


/***/ }),

/***/ "./node_modules/symbol-observable/es/index.js":
/*!****************************************************!*\
  !*** ./node_modules/symbol-observable/es/index.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ponyfill.js */ "./node_modules/symbol-observable/es/ponyfill.js");
/* global window */


var root;

if (typeof self !== 'undefined') {
  root = self;
} else if (typeof window !== 'undefined') {
  root = window;
} else if (typeof global !== 'undefined') {
  root = global;
} else if (true) {
  root = module;
} else {}

var result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__["default"])(root);
/* harmony default export */ __webpack_exports__["default"] = (result);

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

/***/ }),

/***/ "./node_modules/symbol-observable/es/ponyfill.js":
/*!*******************************************************!*\
  !*** ./node_modules/symbol-observable/es/ponyfill.js ***!
  \*******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return symbolObservablePonyfill; });
function symbolObservablePonyfill(root) {
	var result;
	var Symbol = root.Symbol;

	if (typeof Symbol === 'function') {
		if (Symbol.observable) {
			result = Symbol.observable;
		} else {
			result = Symbol('observable');
			Symbol.observable = result;
		}
	} else {
		result = '@@observable';
	}

	return result;
};


/***/ }),

/***/ "./node_modules/uuid/lib/bytesToUuid.js":
/*!**********************************************!*\
  !*** ./node_modules/uuid/lib/bytesToUuid.js ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports) {

/**
 * Convert array of 16 byte values to UUID string format of the form:
 * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
 */
var byteToHex = [];
for (var i = 0; i < 256; ++i) {
  byteToHex[i] = (i + 0x100).toString(16).substr(1);
}

function bytesToUuid(buf, offset) {
  var i = offset || 0;
  var bth = byteToHex;
  // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
  return ([bth[buf[i++]], bth[buf[i++]], 
	bth[buf[i++]], bth[buf[i++]], '-',
	bth[buf[i++]], bth[buf[i++]], '-',
	bth[buf[i++]], bth[buf[i++]], '-',
	bth[buf[i++]], bth[buf[i++]], '-',
	bth[buf[i++]], bth[buf[i++]],
	bth[buf[i++]], bth[buf[i++]],
	bth[buf[i++]], bth[buf[i++]]]).join('');
}

module.exports = bytesToUuid;


/***/ }),

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

// Unique ID creation requires a high quality random # generator.  In the
// browser this is a little complicated due to unknown quality of Math.random()
// and inconsistent support for the `crypto` API.  We do the best we can via
// feature-detection

// getRandomValues needs to be invoked in a context where "this" is a Crypto
// implementation. Also, find the complete implementation of crypto on IE11.
var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||
                      (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));

if (getRandomValues) {
  // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
  var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef

  module.exports = function whatwgRNG() {
    getRandomValues(rnds8);
    return rnds8;
  };
} else {
  // Math.random()-based (RNG)
  //
  // If all else fails, use Math.random().  It's fast, but is of unspecified
  // quality.
  var rnds = new Array(16);

  module.exports = function mathRNG() {
    for (var i = 0, r; i < 16; i++) {
      if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
      rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
    }

    return rnds;
  };
}


/***/ }),

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

var rng = __webpack_require__(/*! ./lib/rng */ "./node_modules/uuid/lib/rng-browser.js");
var bytesToUuid = __webpack_require__(/*! ./lib/bytesToUuid */ "./node_modules/uuid/lib/bytesToUuid.js");

function v4(options, buf, offset) {
  var i = buf && offset || 0;

  if (typeof(options) == 'string') {
    buf = options === 'binary' ? new Array(16) : null;
    options = null;
  }
  options = options || {};

  var rnds = options.random || (options.rng || rng)();

  // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
  rnds[6] = (rnds[6] & 0x0f) | 0x40;
  rnds[8] = (rnds[8] & 0x3f) | 0x80;

  // Copy bytes to buffer, if provided
  if (buf) {
    for (var ii = 0; ii < 16; ++ii) {
      buf[i + ii] = rnds[ii];
    }
  }

  return buf || bytesToUuid(rnds);
}

module.exports = v4;


/***/ }),

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

var g;

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

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

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

module.exports = g;


/***/ }),

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

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


/***/ }),

/***/ "./ts/ConfigSyncService.ts":
/*!*********************************!*\
  !*** ./ts/ConfigSyncService.ts ***!
  \*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const ReconnectingWebSocket = __webpack_require__(/*! reconnectingwebsocket */ "./node_modules/reconnectingwebsocket/reconnecting-websocket.js");
const deep_object_diff_1 = __webpack_require__(/*! deep-object-diff */ "./node_modules/deep-object-diff/dist/index.js");
const actions_1 = __webpack_require__(/*! ./actions */ "./ts/actions.ts");
const syncableActions = [
    actions_1.Action.ADD_WIDGET,
    actions_1.Action.ADD_DASHBOARD,
    actions_1.Action.UPDATE_DASHBOARD,
    actions_1.Action.REMOVE_WIDGET,
    actions_1.Action.UPDATE_WIDGET_CONFIG,
];
class ConfigSyncService {
    constructor() {
        this._connected = false;
        this.url = `ws://${window.location.host}/config-sync`;
        this.ws = new ReconnectingWebSocket(this.url);
        this.ws.onopen = this.onOpen.bind(this);
        this.ws.onmessage = this.onMessage.bind(this);
        this.ws.onclose = this.onClose.bind(this);
    }
    createReduxMiddleware() {
        return store => next => action => {
            const oldState = store.getState();
            let result = next(action);
            const newState = store.getState();
            if (syncableActions.indexOf(action.type) != -1 && !action.time) {
                this.ws.send(JSON.stringify({
                    action,
                    diff: deep_object_diff_1.detailedDiff(oldState, newState),
                }, (k, v) => v === undefined ? null : v)); // convert undefined to null
            }
            return result;
        };
    }
    set dispatcher(val) {
        this._dispatcher = val;
    }
    onClose() {
        this._connected = false;
    }
    get connected() {
        return this._connected;
    }
    onOpen() {
        this._connected = true;
    }
    onMessage(event) {
        const actionData = JSON.parse(event.data);
        this._dispatcher(actionData);
    }
}
exports.default = new ConfigSyncService();


/***/ }),

/***/ "./ts/actions.ts":
/*!***********************!*\
  !*** ./ts/actions.ts ***!
  \***********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const tools_1 = __webpack_require__(/*! ./tools */ "./ts/tools.ts");
const uuid = __webpack_require__(/*! uuid/v4 */ "./node_modules/uuid/v4.js");
var Action;
(function (Action) {
    Action["ADD_WIDGET"] = "ADD_WIDGET";
    Action["ADD_DASHBOARD"] = "ADD_DASHBOARD";
    Action["UPDATE_DASHBOARD"] = "UPDATE_DASHBOARD";
    Action["REMOVE_WIDGET"] = "REMOVE_WIDGET";
    Action["UPDATE_WIDGET_CONFIG"] = "UPDATE_WIDGET_CONFIG";
    Action["SELECT_DASHBOARD"] = "SELECT_DASHBOARD";
    Action["IS_DALOG_OPEN"] = "IS_DALOG_OPEN";
    Action["SET_IDLE"] = "SET_IDLE";
})(Action = exports.Action || (exports.Action = {}));
exports.addDashboard = (name, stepSize) => ({
    type: Action.ADD_DASHBOARD,
    name,
    stepSize,
    id: uuid(),
});
exports.updateDashboard = (data) => ({
    type: Action.UPDATE_DASHBOARD,
    data,
});
exports.addWidget = (dashboardId, widgetType) => ({
    type: Action.ADD_WIDGET,
    dashboardId,
    widgetType,
    id: uuid(),
});
exports.updateWidgetConfig = (widgetId, config) => ({
    type: Action.UPDATE_WIDGET_CONFIG,
    widgetId,
    config,
});
exports.removeWidget = (widgetId) => ({
    type: Action.REMOVE_WIDGET,
    widgetId,
});
exports.selectDashboard = (id) => {
    tools_1.claudeLocalStorage.currentDashboardId = id;
    return {
        type: Action.SELECT_DASHBOARD,
        id,
    };
};
exports.setIsDalogOpen = (isOpen) => {
    return {
        type: Action.IS_DALOG_OPEN,
        isOpen,
    };
};
exports.setIdle = (isIdle) => ({
    type: Action.SET_IDLE,
    isIdle,
});


/***/ }),

/***/ "./ts/api.ts":
/*!*******************!*\
  !*** ./ts/api.ts ***!
  \*******************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const tools_1 = __webpack_require__(/*! ./tools */ "./ts/tools.ts");
class ApiFetcher {
    async fetch(endpoint, data, method = 'POST') {
        const resp = await fetch(`/api/${endpoint}`, {
            method: method,
            headers: {
                'Content-type': 'application/json'
            },
            body: data ? JSON.stringify(data) : undefined,
        });
        return await resp.json();
    }
    async getServerStatus(ip, statusServerPort) {
        return this.fetch('server-status', { ip, statusServerPort });
    }
    async getIdokepCurrent(city) {
        return this.fetch(`idokep/current/${city}`, null, 'GET');
    }
    async getIdokepDays(city) {
        return this.fetch(`idokep/days/${city}`, null, 'GET');
    }
    async getIdokepHours(city) {
        return this.fetch(`idokep/hours/${city}`, null, 'GET');
    }
    async transmission(url, username, password) {
        return tools_1.convertKeysToCamelCase(await this.fetch('transmission', { url, username, password }));
    }
}
exports.default = new ApiFetcher();


/***/ }),

/***/ "./ts/components/CalendarWidget.tsx":
/*!******************************************!*\
  !*** ./ts/components/CalendarWidget.tsx ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const React = __webpack_require__(/*! react */ "react");
const types_1 = __webpack_require__(/*! ../types */ "./ts/types.ts");
const WidgetFrame_1 = __webpack_require__(/*! ../containers/WidgetFrame */ "./ts/containers/WidgetFrame.ts");
const WidgetMenu_1 = __webpack_require__(/*! ./WidgetMenu */ "./ts/components/WidgetMenu.tsx");
const tools_1 = __webpack_require__(/*! ./tools */ "./ts/components/tools.tsx");
const react_1 = __webpack_require__(/*! react */ "react");
const moment = __webpack_require__(/*! moment */ "moment");
const classNames = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
const tools_2 = __webpack_require__(/*! ../tools */ "./ts/tools.ts");
const themes_1 = __webpack_require__(/*! ../themes */ "./ts/themes.ts");
const bodyPadding = 5;
const gridAutoRows = ({ config }) => {
    return config.settings.months == 'rolling' ? `${(config.width - 2 * bodyPadding) / 7}px` : '';
};
const styles = () => core_1.createStyles({
    body: {
        padding: bodyPadding,
        display: 'flex',
        flexDirection: 'column',
        height: '100%',
        fontSize: tools_2.WidgetStyle.getRelativeSize(0.06).width,
    },
    currentDateRow: {
        textAlign: 'center',
        paddingBottom: '0.5em',
        '&::first-letter': {
            textTransform: 'uppercase',
        },
    },
    weekRow: {
        display: 'grid',
        gridTemplateColumns: 'repeat(7, 1fr)',
        justifyItems: 'center',
        paddingBottom: '0.5em',
    },
    daysGridContainer: {
        overflow: 'hidden',
        flexGrow: 1,
        position: 'relative',
    },
    daysGrid: {
        display: 'grid',
        gridTemplateColumns: 'repeat(7, 1fr)',
        gridAutoRows: gridAutoRows,
        justifyItems: 'stretch',
        alignItems: 'stretch',
        position: 'relative',
        height: ({ config }) => config.settings.months == 'fixed' ? '100%' : 'auto',
        '& > div': {
            display: 'flex',
            justifyContent: 'center',
            alignItems: 'center',
            fontSize: tools_2.WidgetStyle.getRelativeSize(0.06).width,
        },
    },
    notCurrentMonthDay: {
        opacity: 0.3,
    },
    currentDay: {}
});
class Settings extends types_1.BaseWidgetSettings {
    constructor() {
        super(...arguments);
        this.months = 'fixed';
    }
}
exports.Settings = Settings;
function roundTo(val, to) {
    return Math.round(val / to) * to;
}
exports.default = core_1.withStyles(styles)((props) => {
    let daysGridContainerElement = null;
    const today = () => moment(new Date().getTime()).startOf('day').format('YYYYMMDD');
    const { config, classes, dashboardConfig } = props;
    const [currentDate, setCurrentDate] = react_1.useState(today());
    tools_1.useInterval(() => {
        const newVal = today();
        if (currentDate != newVal)
            setCurrentDate(newVal);
    }, 1000);
    const currentMomentDate = moment(currentDate);
    React.useEffect(() => alignDaysGrid());
    const calcDayPadding = () => {
        const { width, height } = config;
        return roundTo((height - width) / (width * 0.03), 7);
    };
    const dayPadding = config.settings.months == 'rolling' ? calcDayPadding() : 0;
    const firstDayOfWeekForMonth = parseInt(currentMomentDate.clone().startOf('month').format('E'));
    let cyc = currentMomentDate.clone().startOf('month').subtract(firstDayOfWeekForMonth - 1 + dayPadding, 'd');
    let days = [];
    let end = currentMomentDate.clone().add(1, 'month').startOf('month').subtract(1, 'd');
    end.add(7 - end.isoWeekday() + dayPadding, 'd');
    while (1) {
        days.push(cyc.clone());
        cyc.add(1, 'd');
        if (cyc.isAfter(end))
            break;
    }
    const currentMonth = currentMomentDate.format('M');
    const renderDay = (day) => {
        const month = day.format('M');
        const dayNumber = day.format('D');
        const className = classNames({
            [classes.notCurrentMonthDay]: currentMonth != month,
            [classes.currentDay]: day.isSame(today()),
        });
        let style = {};
        if (day.isSame(today()))
            style = themes_1.claudeThemes[dashboardConfig.theme].calendar.today;
        return (React.createElement("div", { style: style, className: className, key: `${month}.${dayNumber}` }, dayNumber));
    };
    const alignDaysGrid = () => {
        if (!daysGridContainerElement)
            return;
        let daysGrid = daysGridContainerElement.childNodes[0];
        daysGrid.style.top = config.settings.months == 'fixed' ? '0px' :
            `${(daysGridContainerElement.offsetHeight - daysGrid.scrollHeight) / 2}px`;
    };
    return (React.createElement(WidgetFrame_1.default, { config: config, dashboardConfig: dashboardConfig },
        React.createElement("div", { className: classes.body },
            React.createElement("div", { className: classes.currentDateRow }, currentMomentDate.format('MMMM')),
            React.createElement("div", { className: classes.weekRow }, moment.weekdaysShort(true).map(name => React.createElement("div", { key: name }, name))),
            React.createElement("div", { className: classes.daysGridContainer, ref: r => daysGridContainerElement = r },
                React.createElement("div", { className: classes.daysGrid }, days.map(renderDay)))),
        React.createElement(WidgetMenu_1.default, { id: config.id, settings: config.settings, settingsFormFields: [{
                    name: 'months',
                    label: 'Months',
                    type: "select",
                    options: [
                        { value: 'fixed', label: 'Fixed' },
                        { value: 'rolling', label: 'Rolling' },
                    ],
                }] })));
});


/***/ }),

/***/ "./ts/components/ChromecastWidget.tsx":
/*!********************************************!*\
  !*** ./ts/components/ChromecastWidget.tsx ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const react_fontawesome_1 = __webpack_require__(/*! @fortawesome/react-fontawesome */ "./node_modules/@fortawesome/react-fontawesome/index.es.js");
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const React = __webpack_require__(/*! react */ "react");
const moment = __webpack_require__(/*! moment */ "moment");
const WidgetFrame_1 = __webpack_require__(/*! ../containers/WidgetFrame */ "./ts/containers/WidgetFrame.ts");
const tools_1 = __webpack_require__(/*! ../tools */ "./ts/tools.ts");
const types_1 = __webpack_require__(/*! ../types */ "./ts/types.ts");
const tools_2 = __webpack_require__(/*! ./tools */ "./ts/components/tools.tsx");
const WidgetMenu_1 = __webpack_require__(/*! ./WidgetMenu */ "./ts/components/WidgetMenu.tsx");
const classNames = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
const react_use_websocket_1 = __webpack_require__(/*! react-use-websocket */ "./node_modules/react-use-websocket/dist/index.js");
const styles = () => core_1.createStyles({
    root: {
        overflow: 'initial',
        '& .body': {
            height: '100%',
            backgroundSize: 'cover',
            backgroundPosition: 'center',
            overflow: 'hidden',
            display: 'flex',
            flexDirection: 'column',
        },
        '& .center': {
            height: '100%',
            display: 'flex',
            justifyContent: 'center',
            alignItems: 'center',
        },
        '& .panel': {
            margin: tools_1.WidgetStyle.getRelativeSize(0.026).width,
            backdropFilter: 'blur(4px)',
            backgroundColor: 'rgba(0,0,0,0.6)',
            padding: tools_1.WidgetStyle.getRelativeSize(0.02).width,
            borderRadius: 5,
            flexGrow: 1,
            display: 'flex',
            alignItems: 'center',
            '&:not(:last-child)': {
                marginBottom: 0,
            },
        },
        '& .title': {
            fontSize: tools_1.WidgetStyle.getRelativeSize(0.05).width,
        },
        '& .time': {
            justifyContent: 'center',
        },
        '& .icon': {
            marginRight: tools_1.WidgetStyle.getRelativeSize(0.05).width,
            fontSize: tools_1.WidgetStyle.getRelativeSize(0.09).width,
        },
        '& .current': {
            fontSize: tools_1.WidgetStyle.getRelativeSize(0.11).width,
            marginRight: tools_1.WidgetStyle.getRelativeSize(0.04).width,
        },
        '& .duration': {
            fontSize: tools_1.WidgetStyle.getRelativeSize(0.06).width,
        },
        '& .initializing': {
            width: tools_1.WidgetStyle.getRelativeSize(0.3).width,
        },
        '& .backdrop': {
            width: '100%',
            height: '100%',
            backgroundSize: 'cover',
            backgroundPosition: 'center',
            borderRadius: '0.4em',
            '& .time': {
                backdropFilter: 'blur(4px)',
                backgroundColor: 'rgba(0,0,0,0.3)',
                fontSize: tools_1.WidgetStyle.getRelativeSize(0.2).width,
                padding: '0.2em 0.4em',
                borderRadius: '0.1em',
            }
        }
    }
});
class Settings extends types_1.BaseWidgetSettings {
    constructor() {
        super(...arguments);
        this.name = 'Olaf';
    }
}
exports.Settings = Settings;
function BackdropApp(props) {
    const getNow = () => moment(new Date()).format('HH:mm');
    const [img, setImg] = React.useState('');
    const [time, setTime] = React.useState(getNow());
    function rollTheImageDice() {
        fetch('https://www.reddit.com/r/EarthPorn.json').then(r => r.json()).then(d => {
            const entries = d.data.children.filter(i => i.data['post_hint'] == 'image');
            const imgurl = entries[Math.floor(Math.random() * entries.length)].data.url;
            setImg(imgurl);
        });
    }
    React.useEffect(rollTheImageDice, []);
    tools_2.useInterval(rollTheImageDice, 10 * 60 * 1000);
    tools_2.useInterval(() => setTime(getNow()), 1000);
    return (React.createElement("div", { className: "backdrop center", style: { backgroundImage: `url(${img})` } },
        React.createElement("span", { className: "time" }, time)));
}
const Panel = (props) => {
    return (React.createElement("div", { className: classNames('panel', props.className), style: props.style }, props.children));
};
const playerIcon = {
    PLAYING: 'play',
    BUFFERING: 'sync-alt',
    PAUSED: 'pause',
    IDLE: 'dot-circle',
    UNKNOWN: 'question',
};
function formatTimeDuration(s) {
    s = Math.round(s);
    return (s - (s %= 60)) / 60 + (9 < s ? ':' : ':0') + s;
}
function LoadingApp(props) {
    return React.createElement("div", { className: "center" },
        React.createElement("img", { className: "initializing", src: "/static/pics/rings.svg" }));
}
function InitializingApp(props) {
    return React.createElement("div", { className: "center" },
        React.createElement("img", { className: "initializing", src: "/static/pics/rings.svg" }));
}
function MediaLoadingScreen(props) {
    return React.createElement("div", { className: "center" },
        React.createElement(react_fontawesome_1.FontAwesomeIcon, { icon: { prefix: 'fab', iconName: props.icon }, style: {
                color: props.color,
                filter: 'drop-shadow(0px 0px 14px white)',
                fontSize: '9em',
            } }));
}
function MediaApp(props) {
    const { title, subTitle, image, currentTime, duration, playerState } = props;
    const [time, setTime] = React.useState(currentTime);
    tools_2.useInterval(() => {
        if (playerState == 'PLAYING') {
            setTime(t => t + 1);
        }
    }, 1000);
    React.useEffect(() => {
        setTime(currentTime);
    }, [currentTime]);
    return (React.createElement("div", { className: "body", style: { backgroundImage: `url(${image})` } },
        React.createElement(Panel, { className: "title" }, title),
        React.createElement(Panel, { style: { fontSize: 20 } }, subTitle),
        React.createElement(Panel, { className: "time" },
            React.createElement(react_fontawesome_1.FontAwesomeIcon, { icon: playerIcon[playerState], className: "icon" }),
            React.createElement("span", { className: "current" }, formatTimeDuration(time)),
            React.createElement("span", { className: "duration" },
                " / ",
                formatTimeDuration(duration)))));
}
const mediaApps = {
    YouTube: {
        loading: {
            icon: 'youtube',
            color: 'rgb(252, 42, 23)',
        },
        data: p => {
            const mediaMetadata = p.media.mediaMetadata;
            return {
                title: mediaMetadata.title,
                subTitle: mediaMetadata.subtitle,
                image: mediaMetadata.images[0].url,
                currentTime: p.media.currentTime,
                duration: p.media.duration,
                playerState: p.media.playerState,
            };
        },
    },
    Spotify: {
        loading: {
            icon: 'spotify',
            color: '#1DB954',
        },
        data: p => {
            const mediaMetadata = p.media.mediaMetadata;
            return {
                title: mediaMetadata.title,
                subTitle: `${mediaMetadata.artist} - ${mediaMetadata.albumName}`,
                image: mediaMetadata.images[0].url,
                currentTime: p.media.currentTime,
                duration: p.media.duration,
                playerState: p.media.playerState,
            };
        },
    },
};
const exampleData = {
    yt: '{"cast":{"isActiveInput":false,"isStandBy":true,"volumeLevel":1,"volumeMuted":false,"appId":"233637DE","displayName":"YouTube","namespaces":["urn:x-cast:com.google.cast.debugoverlay","urn:x-cast:com.google.cast.cac","urn:x-cast:com.google.cast.media","urn:x-cast:com.google.youtube.mdx"],"sessionId":"2d8a8880-5b00-4037-acc1-f9a79c69db3f","transportId":"2d8a8880-5b00-4037-acc1-f9a79c69db3f","statusText":"YouTube"},"media":{"currentTime":901.567,"contentId":"OSTZ4XHJE34","contentType":"x-youtube/video","duration":1303.961,"streamType":"BUFFERED","idleReason":null,"mediaSessionId":1454740611,"playbackRate":1,"playerState":"PLAYING","supportedMediaCommands":262147,"volumeLevel":1,"volumeMuted":false,"mediaCustomData":{},"mediaMetadata":{"metadataType":0,"title":"Worcester - Final Version","subtitle":"Flamu","images":[{"url":"https://i.ytimg.com/vi/OSTZ4XHJE34/hqdefault.jpg"}]},"subtitleTracks":{},"currentSubtitleTracks":[],"lastUpdated":"2019-08-27T19:21:36.901680"}}',
    bd: '{"cast":{"isActiveInput":false,"isStandBy":true,"volumeLevel":1,"volumeMuted":false,"appId":"E8C28D3C","displayName":"Backdrop","namespaces":["urn:x-cast:com.google.cast.debugoverlay","urn:x-cast:com.google.cast.cac","urn:x-cast:com.google.cast.sse","urn:x-cast:com.google.cast.remotecontrol"],"sessionId":"fa0fae95-dab2-4b63-9286-862e3e9cad9b","transportId":"fa0fae95-dab2-4b63-9286-862e3e9cad9b","statusText":""},"media":null}',
    sp: '{"cast":{"isActiveInput":false,"isStandBy":true,"volumeLevel":1,"volumeMuted":false,"appId":"CC32E753","displayName":"Spotify","namespaces":["urn:x-cast:com.google.cast.debugoverlay","urn:x-cast:com.google.cast.cac","urn:x-cast:com.spotify.chromecast.secure.v1","urn:x-cast:com.google.cast.test","urn:x-cast:com.google.cast.broadcast","urn:x-cast:com.google.cast.media"],"sessionId":"b0b7b5ef-7d22-497f-907c-faed8dbc6082","transportId":"b0b7b5ef-7d22-497f-907c-faed8dbc6082","statusText":"Spotify"},"media":{"currentTime":217.796,"contentId":"spotify:track:6dgFhHtleZmYABhqiX8MKV","contentType":"application/x-spotify.track","duration":316.224,"streamType":"BUFFERED","idleReason":null,"mediaSessionId":1,"playbackRate":1,"playerState":"PLAYING","supportedMediaCommands":514511,"volumeLevel":1,"volumeMuted":false,"mediaCustomData":{},"mediaMetadata":{"metadataType":3,"title":"Alive Alone","songName":"Alive Alone","artist":"The Chemical Brothers","albumName":"Exit Planet Dust","images":[{"url":"https://i.scdn.co/image/ba20cec1e90348cb8a2ca00679acc98331eadd78","height":300,"width":300},{"url":"https://i.scdn.co/image/0f1a5fed171dcb0023c33f8d2064329b48314d5b","height":64,"width":64},{"url":"https://i.scdn.co/image/eb286311364f330a69ff3997bd342379d16b2ab0","height":640,"width":640}]},"subtitleTracks":{},"currentSubtitleTracks":[],"lastUpdated":"2019-09-15T06:59:46.700654"}}',
};
exports.default = core_1.withStyles(styles)((props) => {
    const { config, classes, dashboardConfig } = props;
    const [sendMessage, lastMessage, readyState] = react_use_websocket_1.default(`ws://${window.location.host}/chromecast-proxy/${config.settings.name}`);
    const data = (readyState && lastMessage) ? tools_1.convertKeysToCamelCase(JSON.parse(lastMessage.data)) : null;
    // const data: ChromecastStatus = JSON.parse(exampleData.bd);
    // console.log(data);
    // console.log(JSON.stringify(data))
    function renderApp() {
        if (data == null)
            return React.createElement(InitializingApp, { status: data });
        if (data.cast.appId == null)
            return React.createElement(LoadingApp, { status: data });
        const mediaApp = mediaApps[data.cast.displayName];
        if (mediaApp) {
            if (data.media == null || data.media.contentId == null)
                return React.createElement(MediaLoadingScreen, Object.assign({}, mediaApp.loading));
            return React.createElement(MediaApp, Object.assign({}, mediaApp.data(data)));
        }
        return React.createElement(BackdropApp, { status: data });
    }
    return (React.createElement(WidgetFrame_1.default, { className: classes.root, config: config, dashboardConfig: dashboardConfig },
        renderApp(),
        React.createElement(WidgetMenu_1.default, { id: config.id, settings: config.settings, settingsFormFields: [] })));
});


/***/ }),

/***/ "./ts/components/ClockWidget.tsx":
/*!***************************************!*\
  !*** ./ts/components/ClockWidget.tsx ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const moment = __webpack_require__(/*! moment */ "moment");
const React = __webpack_require__(/*! react */ "react");
const WidgetFrame_1 = __webpack_require__(/*! ../containers/WidgetFrame */ "./ts/containers/WidgetFrame.ts");
const WidgetMenu_1 = __webpack_require__(/*! ./WidgetMenu */ "./ts/components/WidgetMenu.tsx");
const tools_1 = __webpack_require__(/*! ../tools */ "./ts/tools.ts");
// some weird rendering shit in Raspberry
const isRasbperry = !!navigator.userAgent.match('Raspbian');
const styles = () => core_1.createStyles({
    body: {
        height: '100%',
        display: 'flex',
        flexDirection: 'column',
        justifyContent: 'center',
        overflow: 'hidden',
    },
    clock: {
        textAlign: 'center',
        lineHeight: isRasbperry ? '120%' : '90%',
        fontFamily: 'Digital7',
        marginTop: isRasbperry ? '-0.3em' : 0,
        fontSize: tools_1.WidgetStyle.getRelativeSize(0.8).height,
    },
    date: {
        textAlign: 'center',
        lineHeight: '95%',
        fontWeight: 'bold',
        fontSize: tools_1.WidgetStyle.getRelativeSize(0.17).height,
    },
});
class Settings {
    constructor() {
        this.showDate = true;
        this.timeFormat = 'HH:mm';
        this.dateFormat = 'YYYY. MMMM D. dddd';
    }
}
exports.Settings = Settings;
class ClockWidget extends React.Component {
    constructor(props) {
        super(props);
        this.timerId = 0;
        this.state = {
            time: this.now,
        };
    }
    get now() {
        return moment(new Date().getTime()).format(this.props.config.settings.timeFormat);
    }
    componentDidMount() {
        this.timerId = window.setInterval(() => {
            const now = this.now;
            if (now != this.state.time)
                this.setState({ time: this.now });
        }, 1000);
    }
    componentWillUnmount() {
        window.clearInterval(this.timerId);
    }
    render() {
        const { config, classes, dashboardConfig } = this.props;
        const dateComp = () => {
            return (React.createElement("div", { className: classes.date }, moment(new Date().getTime()).format(config.settings.dateFormat)));
        };
        const settingsDialogText = React.createElement("span", null,
            "For more info about date & time formats",
            React.createElement("br", null),
            "see the ",
            React.createElement(core_1.Link, { href: "https://momentjs.com/docs/#/displaying/format/", target: "blank" }, "Moment.js"),
            " documentation.");
        return (React.createElement(WidgetFrame_1.default, { config: config, dashboardConfig: dashboardConfig },
            React.createElement("div", { className: classes.body },
                React.createElement("div", { className: classes.clock }, this.state.time),
                config.settings.showDate ? dateComp() : null),
            React.createElement(WidgetMenu_1.default, { id: config.id, settings: config.settings, dialogText: settingsDialogText, settingsFormFields: [{
                        name: "timeFormat",
                        label: "Time format",
                    }, {
                        name: "dateFormat",
                        label: "Date format",
                    }, {
                        name: "showDate",
                        label: "Show date",
                    }] })));
    }
}
exports.default = core_1.withStyles(styles)(ClockWidget);


/***/ }),

/***/ "./ts/components/Dashboard.tsx":
/*!*************************************!*\
  !*** ./ts/components/Dashboard.tsx ***!
  \*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const React = __webpack_require__(/*! react */ "react");
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const widgetRegistry_1 = __webpack_require__(/*! ../widgetRegistry */ "./ts/widgetRegistry.ts");
const themes_1 = __webpack_require__(/*! ../themes */ "./ts/themes.ts");
const styles = () => core_1.createStyles({
    body: {
        height: '100%',
    }
});
function createSettingsClass(data, settingsType) {
    let res = new settingsType();
    for (const key in data) {
        res[key] = data[key];
    }
    return res;
}
exports.default = core_1.withStyles(styles)(React.memo((props) => {
    function factory(wconf) {
        const settingsType = widgetRegistry_1.default[wconf.type].settingsType;
        return React.createElement(widgetRegistry_1.default[wconf.type].factory, {
            config: Object.assign({}, wconf, { settings: createSettingsClass(wconf.settings, settingsType) }),
            dashboardConfig: props.config,
            key: wconf.id,
        });
    }
    return (React.createElement("div", { className: props.classes.body, style: Object.assign({}, themes_1.claudeThemes[props.config.theme].dashboard) }, props.widgets.map(factory)));
}));


/***/ }),

/***/ "./ts/components/DashboardConfigDialog.tsx":
/*!*************************************************!*\
  !*** ./ts/components/DashboardConfigDialog.tsx ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const React = __webpack_require__(/*! react */ "react");
const react_1 = __webpack_require__(/*! react */ "react");
const themes_1 = __webpack_require__(/*! ../themes */ "./ts/themes.ts");
const locales_1 = __webpack_require__(/*! ../locales */ "./ts/locales.ts");
exports.default = (props) => {
    const { show, onClose, title, submit } = props;
    const [data, setData] = react_1.useState(props.data || {
        name: '',
        stepSize: 10,
        theme: 'blue',
    });
    const onSubmit = (ev) => {
        ev.preventDefault();
        submit(data);
    };
    const updateData = (partialData) => {
        setData(Object.assign({}, data, partialData));
    };
    return React.createElement(core_1.Dialog, { open: show, onClose: onClose },
        React.createElement(core_1.DialogTitle, null, title),
        React.createElement("form", { onSubmit: onSubmit },
            React.createElement(core_1.DialogContent, { style: { maxWidth: 300 } },
                React.createElement(core_1.TextField, { autoFocus: true, margin: "dense", id: "name", label: "Name", type: "text", required: true, fullWidth: true, value: data.name, onChange: ev => updateData({ name: ev.target.value }) }),
                React.createElement(core_1.TextField, { margin: "dense", id: "stepSize", label: "Step size", type: "number", required: true, fullWidth: true, value: data.stepSize, onChange: ev => updateData({ stepSize: parseInt(ev.target.value) }) }),
                React.createElement(core_1.FormControl, { fullWidth: true, style: { marginTop: '1em' } },
                    React.createElement(core_1.InputLabel, null, "Theme"),
                    React.createElement(core_1.Select, { fullWidth: true, value: data.theme, onChange: ev => updateData({ theme: ev.target.value }) }, Object.keys(themes_1.claudeThemes).map(k => React.createElement(core_1.MenuItem, { key: k, value: k }, themes_1.claudeThemes[k].title)))),
                React.createElement(core_1.FormControl, { fullWidth: true, style: { marginTop: '1em' } },
                    React.createElement(core_1.InputLabel, null, "Locale"),
                    React.createElement(core_1.Select, { fullWidth: true, value: data.locale, onChange: ev => updateData({ locale: ev.target.value }) }, Object.keys(locales_1.claudeLocales).map(k => React.createElement(core_1.MenuItem, { key: k, value: k }, locales_1.claudeLocales[k].title))))),
            React.createElement(core_1.DialogActions, null,
                React.createElement(core_1.Button, { onClick: onClose, color: "primary" }, "Cancel"),
                React.createElement(core_1.Button, { type: "submit", color: "primary" }, "Submit"))));
};


/***/ }),

/***/ "./ts/components/FlagIcon.tsx":
/*!************************************!*\
  !*** ./ts/components/FlagIcon.tsx ***!
  \************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const React = __webpack_require__(/*! react */ "react");
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const styles = () => core_1.createStyles({
    body: {
        width: 16,
    }
});
exports.default = core_1.withStyles(styles)(React.memo((props) => {
    let src = '';
    if (props.name.length > 2) {
        src = `/static/pics/${props.name}.png`;
    }
    else
        src = `https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.3.0/flags/4x3/${props.name}.svg`;
    return React.createElement("img", { className: props.classes.body, src: src });
}));
exports.countries = {
    localhost: 'Localhost',
    private: 'Local network',
    af: 'Afghanistan',
    al: 'Albania',
    dz: 'Algeria',
    as: 'American Samoa',
    ad: 'Andorra',
    ao: 'Angola',
    ai: 'Anguilla',
    // aq: 'Antarctica',
    // ag: 'Antigua and Barbuda',
    ar: 'Argentina',
    am: 'Armenia',
    // aw: 'Aruba',
    au: 'Australia',
    at: 'Austria',
    az: 'Azerbaijan',
    // bs: 'Bahamas',
    // bh: 'Bahrain',
    // bd: 'Bangladesh',
    bb: 'Barbados',
    by: 'Belarus',
    be: 'Belgium',
    bz: 'Belize',
    // bj: 'Benin',
    bm: 'Bermuda',
    bt: 'Bhutan',
    // bo: 'Bolivia (Plurinational State of)',
    // bq: 'Bonaire, Sint Eustatius and Saba',
    ba: 'Bosnia and Herzegovina',
    bw: 'Botswana',
    bv: 'Bouvet Island',
    br: 'Brazil',
    // io: 'British Indian Ocean Territory',
    bn: 'Brunei Darussalam',
    bg: 'Bulgaria',
    // bf: 'Burkina Faso',
    bi: 'Burundi',
    // cv: 'Cabo Verde',
    kh: 'Cambodia',
    cm: 'Cameroon',
    ca: 'Canada',
    // ky: 'Cayman Islands',
    // cf: 'Central African Republic',
    td: 'Chad',
    cl: 'Chile',
    cn: 'China',
    // cx: 'Christmas Island',
    // cc: 'Cocos (Keeling) Islands',
    co: 'Colombia',
    km: 'Comoros',
    // cd: 'Congo (the Democratic Republic of the)',
    cg: 'Congo',
    ck: 'Cook Islands',
    cr: 'Costa Rica',
    hr: 'Croatia',
    cu: 'Cuba',
    // cw: 'Curaçao',
    cy: 'Cyprus',
    cz: 'Czechia',
    dk: 'Denmark',
    // dj: 'Djibouti',
    dm: 'Dominica',
    // do: 'Dominican Republic',
    ec: 'Ecuador',
    eg: 'Egypt',
    sv: 'El Salvador',
    gq: 'Equatorial Guinea',
    er: 'Eritrea',
    ee: 'Estonia',
    // sz: 'Eswatini',
    // et: 'Ethiopia',
    // fk: 'Falkland Islands [Malvinas]',
    // fo: 'Faroe Islands',
    fj: 'Fiji',
    fi: 'Finland',
    fr: 'France',
    // gf: 'French Guiana',
    // pf: 'French Polynesia',
    // tf: 'French Southern Territories',
    ga: 'Gabon',
    gm: 'Gambia',
    ge: 'Georgia',
    de: 'Germany',
    gh: 'Ghana',
    gi: 'Gibraltar',
    gr: 'Greece',
    gl: 'Greenland',
    gd: 'Grenada',
    gp: 'Guadeloupe',
    gu: 'Guam',
    gt: 'Guatemala',
    gg: 'Guernsey',
    // gn: 'Guinea',
    // gw: 'Guinea-Bissau',
    // gy: 'Guyana',
    ht: 'Haiti',
    // hm: 'Heard Island and McDonald Islands',
    // va: 'Holy See',
    hn: 'Honduras',
    hk: 'Hong Kong',
    hu: 'Hungary',
    is: 'Iceland',
    in: 'India',
    id: 'Indonesia',
    ir: 'Iran',
    iq: 'Iraq',
    ie: 'Ireland',
    // im: 'Isle of Man',
    il: 'Israel',
    it: 'Italy',
    jm: 'Jamaica',
    jp: 'Japan',
    je: 'Jersey',
    jo: 'Jordan',
    kz: 'Kazakhstan',
    ke: 'Kenya',
    ki: 'Kiribati',
    // kp: 'Korea (the Democratic People\'s Republic of)',
    kr: 'Korea',
    kw: 'Kuwait',
    kg: 'Kyrgyzstan',
    lv: 'Latvia',
    lb: 'Lebanon',
    // ls: 'Lesotho',
    lr: 'Liberia',
    ly: 'Libya',
    li: 'Liechtenstein',
    lt: 'Lithuania',
    lu: 'Luxembourg',
    mo: 'Macao',
    mg: 'Madagascar',
    // mw: 'Malawi',
    my: 'Malaysia',
    mv: 'Maldives',
    ml: 'Mali',
    mt: 'Malta',
    // mh: 'Marshall Islands',
    // mq: 'Martinique',
    // mr: 'Mauritania',
    mu: 'Mauritius',
    // yt: 'Mayotte',
    mx: 'Mexico',
    // fm: 'Micronesia (Federated States of)',
    md: 'Moldova',
    mc: 'Monaco',
    mn: 'Mongolia',
    me: 'Montenegro',
    // ms: 'Montserrat',
    // ma: 'Morocco',
    mz: 'Mozambique',
    mm: 'Myanmar',
    na: 'Namibia',
    nr: 'Nauru',
    np: 'Nepal',
    nl: 'Netherlands',
    nc: 'New Caledonia',
    nz: 'New Zealand',
    ni: 'Nicaragua',
    ne: 'Niger',
    // ng: 'Nigeria',
    nu: 'Niue',
    nf: 'Norfolk Island',
    // mp: 'Northern Mariana Islands',
    no: 'Norway',
    om: 'Oman',
    pk: 'Pakistan',
    // pw: 'Palau',
    // ps: 'Palestine, State of',
    pa: 'Panama',
    pg: 'Papua New Guinea',
    py: 'Paraguay',
    pe: 'Peru',
    ph: 'Philippines',
    pn: 'Pitcairn',
    pl: 'Poland',
    pt: 'Portugal',
    pr: 'Puerto Rico',
    qa: 'Qatar',
    // mk: 'Republic of North Macedonia',
    ro: 'Romania',
    ru: 'Russian Federation',
    rw: 'Rwanda',
    // re: 'Réunion',
    // bl: 'Saint Barthélemy',
    // sh: 'Saint Helena, Ascension and Tristan da Cunha',
    // kn: 'Saint Kitts and Nevis',
    // lc: 'Saint Lucia',
    // mf: 'Saint Martin (French part)',
    // pm: 'Saint Pierre and Miquelon',
    // vc: 'Saint Vincent and the Grenadines',
    ws: 'Samoa',
    sm: 'San Marino',
    // st: 'Sao Tome and Principe',
    sa: 'Saudi Arabia',
    sn: 'Senegal',
    rs: 'Serbia',
    sc: 'Seychelles',
    sl: 'Sierra Leone',
    sg: 'Singapore',
    // sx: 'Sint Maarten (Dutch part)',
    sk: 'Slovakia',
    si: 'Slovenia',
    sb: 'Solomon Islands',
    so: 'Somalia',
    za: 'South Africa',
    // gs: 'South Georgia and the South Sandwich Islands',
    // ss: 'South Sudan',
    es: 'Spain',
    lk: 'Sri Lanka',
    sd: 'Sudan',
    sr: 'Suriname',
    // sj: 'Svalbard and Jan Mayen',
    se: 'Sweden',
    ch: 'Switzerland',
    sy: 'Syrian Arab Republic',
    tw: 'Taiwan',
    tj: 'Tajikistan',
    tz: 'Tanzania',
    th: 'Thailand',
    // tl: 'Timor-Leste',
    // tg: 'Togo',
    // tk: 'Tokelau',
    // to: 'Tonga',
    tt: 'Trinidad and Tobago',
    tn: 'Tunisia',
    tr: 'Turkey',
    tm: 'Turkmenistan',
    // tc: 'Turks and Caicos Islands',
    tv: 'Tuvalu',
    ug: 'Uganda',
    ua: 'Ukraine',
    ae: 'United Arab Emirates',
    // gb: 'United Kingdom of Great Britain and Northern Ireland',
    gb: 'Great Britain',
    // um: 'United States Minor Outlying Islands',
    us: 'United States of America',
    uy: 'Uruguay',
    uz: 'Uzbekistan',
    vu: 'Vanuatu',
    ve: 'Venezuela',
    vn: 'Viet Nam',
    // vg: 'Virgin Islands (British)',
    // vi: 'Virgin Islands (U.S.)',
    // wf: 'Wallis and Futuna',
    // eh: 'Western Sahara',
    ye: 'Yemen',
    zm: 'Zambia',
    zw: 'Zimbabwe',
};


/***/ }),

/***/ "./ts/components/IdokepCurrent.tsx":
/*!*****************************************!*\
  !*** ./ts/components/IdokepCurrent.tsx ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const React = __webpack_require__(/*! react */ "react");
const types_1 = __webpack_require__(/*! ../types */ "./ts/types.ts");
const WidgetFrame_1 = __webpack_require__(/*! ../containers/WidgetFrame */ "./ts/containers/WidgetFrame.ts");
const WidgetMenu_1 = __webpack_require__(/*! ./WidgetMenu */ "./ts/components/WidgetMenu.tsx");
const tools_1 = __webpack_require__(/*! ./tools */ "./ts/components/tools.tsx");
const api_1 = __webpack_require__(/*! ../api */ "./ts/api.ts");
const tools_2 = __webpack_require__(/*! ../tools */ "./ts/tools.ts");
const styles = () => core_1.createStyles({
    body: {
        fontSize: tools_2.WidgetStyle.getRelativeSize(0.3).width,
    },
    value: {
        textAlign: 'center',
    },
    img: {
        textAlign: 'center',
        margin: '-0.25em 0',
        '& img': {
            width: tools_2.WidgetStyle.getRelativeSize(0.9).width
        },
    },
    city: {
        fontSize: tools_2.WidgetStyle.getRelativeSize(0.1).width,
        textAlign: 'center',
    },
});
class Settings extends types_1.BaseWidgetSettings {
    constructor() {
        super(...arguments);
        this.city = 'Budapest';
        this.pollInterval = 60 * 10;
        this.showCity = false;
    }
}
exports.Settings = Settings;
exports.default = core_1.withStyles(styles)((props) => {
    const { config, classes, dashboardConfig } = props;
    const [data, setData] = React.useState();
    function fetchData(settings = config.settings) {
        api_1.default.getIdokepCurrent(settings.city).then(setData);
    }
    function onBeforeSettingsSubmit(settings) {
        if (settings.city != config.settings.city)
            fetchData(settings);
    }
    tools_1.useInterval(fetchData, config.settings.pollInterval * 1000);
    React.useEffect(fetchData, []);
    return (React.createElement(WidgetFrame_1.default, { config: config, dashboardConfig: dashboardConfig },
        React.createElement("div", { className: classes.body }, data ? (React.createElement(React.Fragment, null,
            config.settings.showCity ? React.createElement("div", { className: classes.city }, config.settings.city) : null,
            React.createElement("div", { className: classes.value },
                data.value,
                "\u00B0C"),
            React.createElement("div", { className: classes.img },
                React.createElement("img", { src: data.img })))) : null),
        React.createElement(WidgetMenu_1.default, { id: config.id, onBeforeSubmit: onBeforeSettingsSubmit, settings: config.settings, settingsFormFields: [{
                    name: 'city',
                    label: 'City',
                }, {
                    name: 'pollInterval',
                    label: 'Interval',
                }, {
                    name: 'showCity',
                    label: 'Show city name',
                }] })));
});


/***/ }),

/***/ "./ts/components/IdokepDays.tsx":
/*!**************************************!*\
  !*** ./ts/components/IdokepDays.tsx ***!
  \**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const moment = __webpack_require__(/*! moment */ "moment");
const React = __webpack_require__(/*! react */ "react");
const recharts_1 = __webpack_require__(/*! recharts */ "recharts");
const api_1 = __webpack_require__(/*! ../api */ "./ts/api.ts");
const WidgetFrame_1 = __webpack_require__(/*! ../containers/WidgetFrame */ "./ts/containers/WidgetFrame.ts");
const types_1 = __webpack_require__(/*! ../types */ "./ts/types.ts");
const tools_1 = __webpack_require__(/*! ./tools */ "./ts/components/tools.tsx");
const WidgetMenu_1 = __webpack_require__(/*! ./WidgetMenu */ "./ts/components/WidgetMenu.tsx");
const dataRowHeightRatio = {
    dayNumber: 0.06,
    dayText: 0.06,
    dayImage: 0.9,
    precipitationValue: 0.035,
    precipitationProbability: 0.035,
    temperatureChart: 0.8,
};
function getRowShownRatio(baseRatio, { config }) {
    let ratio = baseRatio;
    for (const [key, val] of Object.entries(dataRowHeightRatio)) {
        if (!config.settings.rowsToShow[key])
            ratio += (baseRatio * 2 * val);
    }
    return ratio;
}
const styles = () => core_1.createStyles({
    body: {
        fontSize: p => p.config.height * getRowShownRatio(0.05, p),
    },
    header: {
        paddingTop: '0.6em',
        display: 'flex',
        justifyContent: 'space-around',
        '& > div': {
            display: 'flex',
            alignItems: 'center',
            flexDirection: 'column',
        },
    },
    weatherImage: {
        width: '2.5em',
    },
    precipitation: {
        fontSize: '0.7em',
        textAlign: 'center',
    }
});
class Settings extends types_1.BaseWidgetSettings {
    constructor() {
        super(...arguments);
        this.city = 'Budapest';
        this.pollInterval = 60 * 10;
        // showCity: boolean = false;
        this.days = 7;
        this.rowsToShow = {
            dayNumber: true,
            dayText: true,
            dayImage: true,
            precipitationValue: true,
            precipitationProbability: true,
            temperatureChart: true,
        };
    }
}
exports.Settings = Settings;
function CustomizedLabel(props) {
    const { x, y, stroke, value } = props;
    // TODO fill color! (use theme)
    return React.createElement("text", { x: x, y: y, dy: '-0.5em', fill: "white", textAnchor: "middle" }, value);
}
exports.default = core_1.withStyles(styles)((props) => {
    const { config, classes, dashboardConfig } = props;
    const { rowsToShow } = config.settings;
    const [data, setData] = React.useState([]);
    function fetchData(settings = config.settings) {
        api_1.default.getIdokepDays(settings.city).then(setData);
    }
    function onBeforeSettingsSubmit(settings) {
        if (settings.city != config.settings.city)
            fetchData(settings);
    }
    tools_1.useInterval(fetchData, config.settings.pollInterval * 1000);
    React.useEffect(fetchData, []);
    const displayData = data.slice(0, config.settings.days);
    function DayInfoCell(props) {
        return (React.createElement("div", null,
            React.createElement(tools_1.IfComp, { cond: rowsToShow.dayNumber },
                React.createElement("div", null, props.day.day)),
            React.createElement(tools_1.IfComp, { cond: rowsToShow.dayText },
                React.createElement("div", null, moment(props.day.date).format('dd'))),
            React.createElement(tools_1.IfComp, { cond: rowsToShow.dayImage },
                React.createElement("div", null,
                    React.createElement("img", { className: classes.weatherImage, src: props.day.img }))),
            props.day.precipitation.probability ? React.createElement("div", { className: classes.precipitation },
                React.createElement(tools_1.IfComp, { cond: rowsToShow.precipitationValue },
                    React.createElement("div", null, `${props.day.precipitation.value}mm`)),
                React.createElement(tools_1.IfComp, { cond: rowsToShow.precipitationProbability },
                    React.createElement("div", null, `(${props.day.precipitation.probability}%)`))) : null));
    }
    const baseForMargin = config.height * getRowShownRatio(0.06, props);
    const vertMargin = config.width / config.settings.days / 2;
    return (React.createElement(WidgetFrame_1.default, { config: config, dashboardConfig: dashboardConfig },
        React.createElement("div", { className: classes.body },
            React.createElement("div", { className: classes.header }, displayData.map(day => React.createElement(DayInfoCell, { key: day.date, day: day }))),
            React.createElement(tools_1.IfComp, { cond: rowsToShow.temperatureChart },
                React.createElement(recharts_1.LineChart, { data: displayData, width: config.width, height: config.height * getRowShownRatio(0.54, props), margin: {
                        top: baseForMargin * 1.3,
                        right: vertMargin,
                        bottom: baseForMargin * 0.2,
                        left: vertMargin,
                    } },
                    React.createElement(recharts_1.YAxis, { type: "number", domain: ['dataMin', 'dataMax'], hide: true }),
                    React.createElement(recharts_1.Line, { type: "monotone", dataKey: "max", stroke: "red", strokeWidth: 3, label: CustomizedLabel }),
                    React.createElement(recharts_1.Line, { type: "monotone", dataKey: "min", stroke: "blue", strokeWidth: 3, label: CustomizedLabel })))),
        React.createElement(WidgetMenu_1.default, { id: config.id, onBeforeSubmit: onBeforeSettingsSubmit, settings: config.settings, settingsFormFields: [{
                    name: 'city',
                    label: 'City',
                }, {
                    name: 'days',
                    label: 'Days to show',
                }, {
                    name: 'pollInterval',
                    label: 'Interval',
                }, {
                    type: 'checkboxList',
                    name: 'rowsToShow',
                    label: 'Show data rows',
                    options: [
                        { value: 'dayNumber', label: 'Day number' },
                        { value: 'dayText', label: 'Day text' },
                        { value: 'dayImage', label: 'Day image' },
                        { value: 'precipitationValue', label: 'Precipitation value' },
                        { value: 'precipitationProbability', label: 'Precipitation probability' },
                        { value: 'temperatureChart', label: 'Temperature chart' },
                    ]
                }] })));
});


/***/ }),

/***/ "./ts/components/IdokepHours.tsx":
/*!***************************************!*\
  !*** ./ts/components/IdokepHours.tsx ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const React = __webpack_require__(/*! react */ "react");
const types_1 = __webpack_require__(/*! ../types */ "./ts/types.ts");
const WidgetFrame_1 = __webpack_require__(/*! ../containers/WidgetFrame */ "./ts/containers/WidgetFrame.ts");
const WidgetMenu_1 = __webpack_require__(/*! ./WidgetMenu */ "./ts/components/WidgetMenu.tsx");
const api_1 = __webpack_require__(/*! ../api */ "./ts/api.ts");
const tools_1 = __webpack_require__(/*! ./tools */ "./ts/components/tools.tsx");
const dataRowHeightRatio = {
    image: 0.8,
    precipitationProbability: 0.04,
    precipitationValue: 0.04,
    temperatureChart: 0.8,
};
function getRowShownRatio(baseRatio, { config }) {
    let ratio = baseRatio;
    for (const [key, val] of Object.entries(dataRowHeightRatio)) {
        if (!config.settings.rowsToShow[key])
            ratio += (baseRatio * 2 * val);
    }
    return ratio;
}
const styles = () => core_1.createStyles({
    body: {
        fontSize: (p) => p.config.height * getRowShownRatio(0.055, p),
        display: 'grid',
        gridTemplateColumns: (p) => `repeat(${p.config.settings.hours / 3}, 1fr)`,
        gridTemplateRows: 'repeat(4, min-content) auto',
        justifyItems: 'center',
        padding: '12px 0',
        height: '100%',
    },
    hour: {
        gridRowStart: 1,
    },
    image: {
        gridRowStart: 2,
        '& img': {
            width: '2.5em',
        }
    },
    precipitationProbability: {
        gridRowStart: 4,
        fontSize: '0.7em',
    },
    precipitationValue: {
        gridRowStart: 3,
        fontSize: '0.8em',
    },
    temperatureChart: {
        paddingTop: '0.4em',
        gridRowStart: 5,
        display: 'flex',
        flexDirection: 'column',
        width: '60%',
        '& .text': {
            textAlign: 'center',
        },
        '& .bar': {
            backgroundColor: 'grey',
        }
    },
});
class Settings extends types_1.BaseWidgetSettings {
    constructor() {
        super(...arguments);
        this.city = 'Budapest';
        this.pollInterval = 60 * 10;
        // showCity: boolean = false;
        this.hours = 24;
        this.rowsToShow = {
            image: true,
            precipitationProbability: true,
            precipitationValue: true,
            temperatureChart: true,
        };
    }
}
exports.Settings = Settings;
exports.default = core_1.withStyles(styles)((props) => {
    const { config, classes, dashboardConfig } = props;
    const { rowsToShow } = config.settings;
    const [data, setData] = React.useState([]);
    function fetchData(settings = config.settings) {
        api_1.default.getIdokepHours(settings.city).then(setData);
    }
    function onBeforeSettingsSubmit(settings) {
        if (settings.city != config.settings.city)
            fetchData(settings);
    }
    tools_1.useInterval(fetchData, config.settings.pollInterval * 1000);
    React.useEffect(fetchData, []);
    const displayData = data.slice(0, config.settings.hours / 3);
    const temps = displayData.map(d => d.temp);
    const maxTemp = Math.max(...temps) + 1;
    const minTemp = Math.min(...temps) - 1;
    let cells = [];
    let idx = 0;
    for (const hourData of displayData) {
        const barColorLight = 100 - (30 + (hourData.temp - minTemp) / (maxTemp - minTemp) * 40);
        cells.push(React.createElement("div", { key: idx++, className: classes.hour },
            hourData.hour,
            "h"), React.createElement(tools_1.IfComp, { cond: rowsToShow.image },
            React.createElement("div", { key: idx++, className: classes.image },
                React.createElement("img", { src: hourData.img }))), React.createElement(tools_1.IfComp, { cond: rowsToShow.precipitationValue },
            React.createElement("div", { key: idx++, className: classes.precipitationValue }, hourData.precipitation.value ? `${hourData.precipitation.value} mm` : null)), React.createElement(tools_1.IfComp, { cond: rowsToShow.precipitationProbability },
            React.createElement("div", { key: idx++, className: classes.precipitationProbability }, hourData.precipitation.probability ? `(${hourData.precipitation.probability}%)` : null)), React.createElement(tools_1.IfComp, { cond: rowsToShow.temperatureChart },
            React.createElement("div", { key: idx++, className: classes.temperatureChart },
                React.createElement("div", { style: { flexGrow: 1 } }),
                React.createElement("div", { className: "text" }, hourData.temp),
                React.createElement("div", { className: "bar", style: {
                        height: `${(hourData.temp - minTemp) / (maxTemp - minTemp) * 100}%`,
                        backgroundColor: `hsl(350, 62%, ${barColorLight}%)`,
                    } }))));
    }
    return (React.createElement(WidgetFrame_1.default, { config: config, dashboardConfig: dashboardConfig },
        React.createElement("div", { className: classes.body }, cells),
        React.createElement(WidgetMenu_1.default, { id: config.id, settings: config.settings, settingsFormFields: [{
                    name: 'city',
                    label: 'City',
                }, {
                    name: 'hours',
                    label: 'Hours to show',
                    type: 'select',
                    options: Array.from(Array(11).keys()).map(i => ({ value: `${i * 3 + 6}`, label: `${i * 3 + 6}h` })),
                }, {
                    name: 'pollInterval',
                    label: 'Interval',
                }, {
                    type: 'checkboxList',
                    name: 'rowsToShow',
                    label: 'Show data rows',
                    options: [
                        { value: 'image', label: 'Image' },
                        { value: 'precipitationProbability', label: 'Precipitation probability' },
                        { value: 'precipitationValue', label: 'Precipitation value' },
                        { value: 'temperatureChart', label: 'Temperature chart' },
                    ]
                }] })));
});


/***/ }),

/***/ "./ts/components/InfluxTable.tsx":
/*!***************************************!*\
  !*** ./ts/components/InfluxTable.tsx ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const React = __webpack_require__(/*! react */ "react");
const WidgetFrame_1 = __webpack_require__(/*! ../containers/WidgetFrame */ "./ts/containers/WidgetFrame.ts");
const WidgetMenu_1 = __webpack_require__(/*! ./WidgetMenu */ "./ts/components/WidgetMenu.tsx");
const tools_1 = __webpack_require__(/*! ./tools */ "./ts/components/tools.tsx");
const tools_2 = __webpack_require__(/*! ../tools */ "./ts/tools.ts");
const styles = () => core_1.createStyles({
    body: {
        height: '100%',
        display: 'flex',
        flexDirection: 'column',
        '& table': {
            width: '100%',
            height: '100%',
            '& td': {
                padding: '0.1em 0.12em',
            },
            '& th:first-letter': {
                textTransform: 'capitalize',
            }
        },
        padding: '0.4em',
        fontSize: tools_2.WidgetStyle.getRelativeSize(0.06).width,
    },
    title: {
        textAlign: 'center',
        fontSize: '1.1em',
        padding: '0.1em',
    },
    noConfig: {
        display: 'flex',
        justifyContent: 'center',
        alignItems: 'center',
        height: '100%',
    },
});
class Settings {
    constructor() {
        this.title = '';
        this.url = '';
        this.query = '';
        this.columns = '';
        this.interval = 60;
    }
}
exports.Settings = Settings;
exports.default = core_1.withStyles(styles)((props) => {
    const [data, setData] = React.useState([]);
    const { config, classes, dashboardConfig } = props;
    function fetchData(settings = config.settings) {
        if (!settings.url)
            return;
        fetch(settings.url, {
            method: 'POST',
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded',
                'Accept': 'application/json',
            },
            body: `q=${encodeURIComponent(settings.query)}`,
        }).then(res => res.json()).then((data) => {
            if (data.error) {
                console.error(data.error);
                return;
            }
            let res = [];
            for (let rowData of data.results[0].series) {
                let row = Object.assign({}, rowData.tags);
                rowData.columns.map((c, idx) => {
                    row[c] = rowData.values[0][idx];
                });
                res.push(row);
            }
            setData(res);
        });
    }
    tools_1.useInterval(fetchData, config.settings.interval * 1000);
    React.useEffect(fetchData, []);
    const cols = () => {
        return config.settings.columns.split(',').map(s => s.trim());
    };
    const renderCell = (col, val) => {
        const isNum = !isNaN(val);
        return React.createElement("td", { style: { textAlign: isNum ? 'right' : 'left' }, key: col }, isNum ? val.toFixed(1) : val);
    };
    const renderRow = (row, idx) => {
        return React.createElement("tr", { key: idx }, cols().map(c => renderCell(c, row[c])));
    };
    return (React.createElement(WidgetFrame_1.default, { config: config, dashboardConfig: dashboardConfig },
        React.createElement("div", { className: classes.body },
            config.settings.title ? React.createElement("div", { className: classes.title }, config.settings.title) : null,
            config.settings.url ? null : React.createElement("div", { className: classes.noConfig }, "No config."),
            React.createElement("div", { style: { flexGrow: 1 } },
                React.createElement("table", null,
                    React.createElement("thead", null,
                        React.createElement("tr", null, cols().map(c => React.createElement("th", { key: c }, c)))),
                    React.createElement("tbody", null, data.map(renderRow))))),
        React.createElement(WidgetMenu_1.default, { id: config.id, settings: config.settings, onBeforeSubmit: fetchData, settingsFormFields: [
                { name: 'title', label: 'Title' },
                { name: 'url', label: 'URL' },
                { name: 'query', label: 'Query' },
                { name: 'columns', label: 'Columns' },
                { name: 'interval', label: 'Interval' }
            ] })));
});


/***/ }),

/***/ "./ts/components/ServerStatusWidget.tsx":
/*!**********************************************!*\
  !*** ./ts/components/ServerStatusWidget.tsx ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const react_fontawesome_1 = __webpack_require__(/*! @fortawesome/react-fontawesome */ "./node_modules/@fortawesome/react-fontawesome/index.es.js");
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const moment = __webpack_require__(/*! moment */ "moment");
const React = __webpack_require__(/*! react */ "react");
const react_1 = __webpack_require__(/*! react */ "react");
const api_1 = __webpack_require__(/*! ../api */ "./ts/api.ts");
const FlagIcon_1 = __webpack_require__(/*! ./FlagIcon */ "./ts/components/FlagIcon.tsx");
const tools_1 = __webpack_require__(/*! ./tools */ "./ts/components/tools.tsx");
const WidgetFrame_1 = __webpack_require__(/*! ../containers/WidgetFrame */ "./ts/containers/WidgetFrame.ts");
const WidgetMenu_1 = __webpack_require__(/*! ./WidgetMenu */ "./ts/components/WidgetMenu.tsx");
const colRatioRef = {
    name: p => 0.85 - (Math.max(...Object.values(p.config.settings.servers).map(s => s.name.length)) - 7) / 70,
    ping: p => 0.95,
    load: p => 0.75,
    memory: p => 0.95,
    uptime: p => 0.90,
};
const styles = () => core_1.createStyles({
    body: {
        fontSize: (props) => {
            let baseSize = props.config.width * 0.062;
            for (let [col, enabled] of Object.entries(props.config.settings.columns)) {
                if (enabled)
                    baseSize *= colRatioRef[col](props);
            }
            return baseSize > 100 ? 16 : (baseSize < 5 ? 10 : baseSize);
        },
        padding: '0.5em',
        '& table': {
            borderSpacing: 0,
            width: '100%',
            '& td, & th': {
                padding: '0.2em 0.4em',
            },
            '& tr': {
                transition: 'opacity 1s',
            },
            '& th': {
                borderBottom: '1px solid rgba(255,255,255,0.5)'
            }
        },
    },
    nodata: {
        opacity: 0.3,
    },
    loadCol: {
        textAlign: 'right',
    }
});
class Settings {
    constructor() {
        this.servers = {};
        this.columns = { load: true, memory: true, name: true, ping: true, uptime: true };
        this.pollInterval = 60;
    }
}
exports.Settings = Settings;
exports.default = core_1.withStyles(styles)((props) => {
    const { config, classes, dashboardConfig } = props;
    const { settings } = config;
    const [serverInfo, setServerInfo] = react_1.useState({});
    const fetchServerInfo = (servers = settings.servers) => {
        for (let desc of Object.values(servers)) {
            api_1.default.getServerStatus(desc.ip, desc.systemStatusServerPort).then(d => {
                setServerInfo(info => Object.assign({}, info, { [desc.ip]: d }));
            });
        }
    };
    react_1.useEffect(fetchServerInfo, []);
    tools_1.useInterval(() => {
        fetchServerInfo();
    }, settings.pollInterval * 1000);
    const onBeforeSettingsSubmit = (data) => {
        // TODO: check if was a new server added (search for new ips)
        fetchServerInfo(data.servers);
    };
    const Status = (props) => {
        const info = serverInfo[props.ip];
        let icon = 'question-circle';
        let color = 'unset';
        if (info) {
            if (info.ping == null) {
                icon = 'times-circle';
                color = '#d40303';
            }
            else {
                icon = info.load ? 'check-circle' : 'exclamation-circle';
                color = info.load ? '#37a702' : '#d46703';
            }
        }
        return React.createElement(react_fontawesome_1.FontAwesomeIcon, { icon: icon, style: { color: color } });
    };
    const cols = settings.columns;
    const renderRow = (cfg) => {
        const info = serverInfo[cfg.ip];
        const baseCols = React.createElement(tools_1.IfComp, { cond: cols.name },
            React.createElement("td", null,
                React.createElement(Status, { ip: cfg.ip })),
            React.createElement("td", null, cfg.name),
            React.createElement("td", { style: { maxWidth: 30 } },
                React.createElement(FlagIcon_1.default, { name: cfg.location })));
        if (!info)
            return React.createElement("tr", { className: classes.nodata, key: cfg.name }, baseCols);
        return React.createElement("tr", { key: cfg.name },
            baseCols,
            React.createElement(tools_1.IfComp, { cond: cols.ping },
                React.createElement("td", { style: { textAlign: 'right' } }, info.ping != null ? `${info.ping} ms` : null)),
            React.createElement(tools_1.IfComp, { cond: cols.load },
                React.createElement("td", { className: classes.loadCol }, info.load ? info.load[0].toFixed(2) : null),
                React.createElement("td", { className: classes.loadCol }, info.load ? info.load[1].toFixed(2) : null),
                React.createElement("td", { className: classes.loadCol }, info.load ? info.load[2].toFixed(2) : null)),
            React.createElement(tools_1.IfComp, { cond: cols.memory },
                React.createElement("td", { style: { textAlign: 'right' } }, info.memory ? `${info.memory.percent.toFixed(1)}%` : null)),
            React.createElement(tools_1.IfComp, { cond: cols.uptime },
                React.createElement("td", null, info.uptime ? moment.duration(info.uptime * 1000).humanize() : null)));
    };
    return (React.createElement(WidgetFrame_1.default, { config: config, dashboardConfig: dashboardConfig },
        React.createElement("div", { className: classes.body },
            React.createElement("table", null,
                React.createElement("thead", null,
                    React.createElement("tr", null,
                        React.createElement(tools_1.IfComp, { cond: cols.name },
                            React.createElement("th", { colSpan: 3 }, "Name")),
                        React.createElement(tools_1.IfComp, { cond: cols.ping },
                            React.createElement("th", null, "Ping")),
                        React.createElement(tools_1.IfComp, { cond: cols.load },
                            React.createElement("th", { colSpan: 3 }, "Load")),
                        React.createElement(tools_1.IfComp, { cond: cols.memory },
                            React.createElement("th", null, "Mem")),
                        React.createElement(tools_1.IfComp, { cond: cols.uptime },
                            React.createElement("th", null, "Uptime")))),
                React.createElement("tbody", null, Object.values(settings.servers).sort((s1, s2) => s1.rank - s2.rank).map(renderRow)))),
        React.createElement(WidgetMenu_1.default, { id: config.id, onBeforeSubmit: onBeforeSettingsSubmit, settings: config.settings, settingsFormFields: [{
                    name: 'pollInterval',
                    label: 'Polling interval',
                    min: 0,
                    max: 65565,
                }, {
                    type: 'list',
                    label: 'Servers',
                    name: 'servers',
                    addButtonLabel: 'Add server',
                    fields: [{
                            name: 'name',
                            label: 'Name',
                            default: '',
                        }, {
                            name: 'ip',
                            label: 'IP',
                            default: '',
                        }, {
                            name: 'location',
                            label: 'Location',
                            default: 'hu',
                            type: 'select',
                            options: Object.keys(FlagIcon_1.countries).map(code => ({ value: code, label: FlagIcon_1.countries[code] }))
                        }, {
                            name: 'systemStatusServerPort',
                            label: 'Status port',
                            default: 35280,
                        }]
                }, {
                    type: 'checkboxList',
                    name: 'columns',
                    label: 'Columns',
                    options: [
                        { value: 'name', label: 'Name' },
                        { value: 'ping', label: 'Ping' },
                        { value: 'load', label: 'Load' },
                        { value: 'memory', label: 'Memory' },
                        { value: 'uptime', label: 'Uptime' },
                    ]
                }] })));
});


/***/ }),

/***/ "./ts/components/StorageStatusWidget.tsx":
/*!***********************************************!*\
  !*** ./ts/components/StorageStatusWidget.tsx ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const React = __webpack_require__(/*! react */ "react");
const react_1 = __webpack_require__(/*! react */ "react");
const tools_1 = __webpack_require__(/*! ./tools */ "./ts/components/tools.tsx");
const WidgetFrame_1 = __webpack_require__(/*! ../containers/WidgetFrame */ "./ts/containers/WidgetFrame.ts");
const WidgetMenu_1 = __webpack_require__(/*! ./WidgetMenu */ "./ts/components/WidgetMenu.tsx");
const tools_2 = __webpack_require__(/*! ../tools */ "./ts/tools.ts");
// import * as prettyBytes from 'pretty-bytes';
const styles = () => core_1.createStyles({
    body: {
        fontSize: tools_2.WidgetStyle.getRelativeSize(0.05).width,
        padding: '0.4em',
        '& table': {
            width: '100%',
            '& td': {
                padding: '0.15em 0.3em',
            }
        }
    },
    empty: {
        display: 'flex',
        justifyContent: 'center',
        alignItems: 'center',
        height: '100%',
        fontSize: tools_2.WidgetStyle.getRelativeSize(0.07).width,
    },
    title: {
        textAlign: 'center',
        fontSize: '1.1em',
        padding: '0.2em',
    },
});
class Settings {
    constructor() {
        this.host = '';
        this.pollInterval = 600;
        this.title = '';
        this.sortBy = 'device';
    }
}
exports.Settings = Settings;
exports.default = core_1.withStyles(styles)((props) => {
    const { config, classes, dashboardConfig } = props;
    const { settings } = config;
    const [storageInfo, setStorageInfo] = react_1.useState([]);
    const fetchStorageInfo = (host = null) => {
        if (host || settings.host) {
            fetch(`http://${host || settings.host}:35280/`).then(rd => rd.json()).then(d => {
                setStorageInfo(d.hdd);
            });
        }
    };
    react_1.useEffect(fetchStorageInfo, []);
    tools_1.useInterval(fetchStorageInfo, settings.pollInterval * 1000);
    const onBeforeSettingsSubmit = (data) => {
        fetchStorageInfo(data.host);
    };
    const gigabytize = (val) => {
        const gb = val / 1024 / 1024 / 1024;
        return gb.toFixed(1) + ' GiB';
    };
    const comparator = (a, b) => {
        if (a < b)
            return -1;
        if (b < a)
            return 1;
        return 0;
    };
    const renderBody = () => {
        if (!settings.host)
            return React.createElement("div", { className: classes.empty }, "No host defined!");
        return (React.createElement("div", { className: classes.body },
            settings.title ? React.createElement("div", { className: classes.title }, settings.title) : null,
            React.createElement("table", null,
                React.createElement("tbody", null, storageInfo.sort((a, b) => comparator(a[settings.sortBy], b[settings.sortBy])).map(s => React.createElement("tr", { key: s.mount },
                    React.createElement("td", null, s.label),
                    React.createElement("td", { style: { textAlign: 'right' } },
                        s.percent.toFixed(1),
                        " %"),
                    React.createElement("td", { style: { textAlign: 'right' } }, gigabytize(s.free))))))));
    };
    return (React.createElement(WidgetFrame_1.default, { config: config, dashboardConfig: dashboardConfig },
        renderBody(),
        React.createElement(WidgetMenu_1.default, { id: config.id, onBeforeSubmit: onBeforeSettingsSubmit, settings: config.settings, settingsFormFields: [{
                    name: 'host',
                    label: 'Host',
                }, {
                    name: 'title',
                    label: 'Title',
                }, {
                    name: 'pollInterval',
                    label: 'Poll interval',
                }, {
                    name: 'sortBy',
                    label: 'Sort',
                    type: 'select',
                    options: [
                        { value: 'device', label: 'Device name' },
                        { value: 'free', label: 'Free bytes' },
                        { value: 'label', label: 'Label' },
                        { value: 'mount', label: 'Mount point' },
                        { value: 'percent', label: 'Used percent' },
                        { value: 'total', label: 'Total bytes' },
                        { value: 'used', label: 'Used bytes' },
                    ],
                }] })));
});


/***/ }),

/***/ "./ts/components/TransmissionWidget.tsx":
/*!**********************************************!*\
  !*** ./ts/components/TransmissionWidget.tsx ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const React = __webpack_require__(/*! react */ "react");
const types_1 = __webpack_require__(/*! ../types */ "./ts/types.ts");
const WidgetFrame_1 = __webpack_require__(/*! ../containers/WidgetFrame */ "./ts/containers/WidgetFrame.ts");
const WidgetMenu_1 = __webpack_require__(/*! ./WidgetMenu */ "./ts/components/WidgetMenu.tsx");
const api_1 = __webpack_require__(/*! ../api */ "./ts/api.ts");
const tools_1 = __webpack_require__(/*! ./tools */ "./ts/components/tools.tsx");
const tools_2 = __webpack_require__(/*! ../tools */ "./ts/tools.ts");
const moment = __webpack_require__(/*! moment */ "moment");
const react_fontawesome_1 = __webpack_require__(/*! @fortawesome/react-fontawesome */ "./node_modules/@fortawesome/react-fontawesome/index.es.js");
const styles = () => core_1.createStyles({
    body: {
        fontSize: tools_2.WidgetStyle.getRelativeSize(0.025).width,
        '& .torrentList': {
            padding: '0.5em',
            display: 'grid',
            gridTemplateColumns: 'auto repeat(3, 1fr)',
            gridColumnGap: '0.6em',
            gridRowGap: '0.3em',
            '& .name': {
                overflow: 'hidden',
                textOverflow: 'ellipsis',
            },
            '& div': {
                whiteSpace: 'nowrap',
            },
            '& .percent, & .rate': {
                textAlign: 'right',
            }
        },
        '& .stats': {
            padding: '0.5em',
            '& > span': {
                padding: '0.5em',
            }
        }
    }
});
class Settings extends types_1.BaseWidgetSettings {
    constructor() {
        super(...arguments);
        this.host = '';
        this.ssl = false;
        this.port = 9091;
        this.path = '/transmission/rpc';
        this.username = '';
        this.password = '';
    }
    get url() {
        return `http${this.ssl ? 's' : ''}://${this.host}:${this.port}${this.path}`;
    }
}
exports.Settings = Settings;
function TorrentList(props) {
    function Torrent(props) {
        const { id, name, percentDone, rateDownload, eta } = props.data;
        return (React.createElement(React.Fragment, null,
            React.createElement("div", { className: "name" }, name),
            React.createElement("div", { className: "percent" },
                Math.round(percentDone * 100),
                "%"),
            React.createElement("div", { className: "rate" },
                tools_2.humanFileSize(rateDownload),
                "/s"),
            React.createElement("div", { className: "eta" }, moment.duration(eta * 1000).humanize())));
    }
    const torrents = props.torrents.filter(t => t.rateDownload != 0);
    return (React.createElement("div", { className: "torrentList" }, torrents.map(t => React.createElement(Torrent, { key: t.id, data: t }))));
}
function Error(props) {
    return React.createElement("div", null, props.msg);
}
function SessionStats(props) {
    const { sessionStats: { torrentCount, uploadSpeed, downloadSpeed }, torrents } = props;
    return (React.createElement("div", { className: "stats" },
        React.createElement("span", { style: { paddingRight: 0 } }, "Active:"),
        React.createElement("span", null,
            torrents.filter(t => t.peersConnected).length,
            " / ",
            torrentCount),
        React.createElement("span", null, "Speed:"),
        React.createElement(react_fontawesome_1.FontAwesomeIcon, { icon: "chevron-circle-down", style: { color: '#08D' } }),
        React.createElement("span", null,
            tools_2.humanFileSize(downloadSpeed),
            "/s"),
        React.createElement(react_fontawesome_1.FontAwesomeIcon, { icon: "chevron-circle-up", style: { color: '#090' } }),
        React.createElement("span", null,
            tools_2.humanFileSize(uploadSpeed),
            "/s")));
}
exports.default = core_1.withStyles(styles)((props) => {
    const { config, config: { id, settings }, classes, dashboardConfig } = props;
    const [data, setData] = React.useState();
    function fetchData(cfg = settings) {
        if (cfg.host)
            api_1.default.transmission(cfg.url, cfg.username, cfg.password).then(setData);
    }
    tools_1.useInterval(fetchData, 5 * 1000);
    React.useEffect(fetchData, []);
    return (React.createElement(WidgetFrame_1.default, { config: config, dashboardConfig: dashboardConfig },
        React.createElement("div", { className: classes.body }, data ? (typeof data.data == 'string' ? React.createElement(Error, { msg: data.data }) : (React.createElement(React.Fragment, null,
            React.createElement(SessionStats, Object.assign({}, data.data)),
            React.createElement(TorrentList, { torrents: data.data.torrents })))) : ''),
        React.createElement(WidgetMenu_1.default, { id: id, settings: settings, settingsFormFields: [
                { name: 'host', label: 'Host' },
                { name: 'ssl', label: 'SSL' },
                { name: 'port', label: 'Port' },
                { name: 'path', label: 'Path' },
                { name: 'username', label: 'Username' },
                { name: 'password', label: 'Password' }
            ] })));
});


/***/ }),

/***/ "./ts/components/WidgetFrame.tsx":
/*!***************************************!*\
  !*** ./ts/components/WidgetFrame.tsx ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const React = __webpack_require__(/*! react */ "react");
const react_rnd_1 = __webpack_require__(/*! react-rnd */ "./node_modules/react-rnd/lib/index.js");
const themes_1 = __webpack_require__(/*! ../themes */ "./ts/themes.ts");
const classNames = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
const styles = () => core_1.createStyles({
    body: {
        borderRadius: 5,
        height: '100%',
        position: 'relative',
        overflow: 'hidden',
        backdropFilter: 'blur(3px)',
        '&:hover .widget-menu': {
            opacity: 1,
        },
    },
    hiddenMenuIcon: {
        '& .widget-menu': {
            opacity: 0,
        },
    }
});
function isEquals(o1, o2) {
    for (const k of Object.keys(o1)) {
        if (o1[k] !== o2[k])
            return false;
    }
    return true;
}
function WidgetFrame(props) {
    const { config, dashboardConfig, updateWidgetConfig, classes, isDialogOpen, isIdle } = props;
    const [position, setPosition] = React.useState({
        x: config.x,
        y: config.y,
    });
    const [size, setSize] = React.useState({
        width: config.width,
        height: config.height,
    });
    const updatePosition = (newData) => {
        if (isEquals(newData, position))
            return;
        setPosition(newData);
        updateWidgetConfig(config.id, newData);
    };
    const onDragStop = (e, data) => {
        updatePosition({
            x: data.lastX,
            y: data.lastY,
        });
    };
    const onDrag = (e, data) => {
        updatePosition({
            x: data.x,
            y: data.y,
        });
    };
    const onResizeStop = (e, dir, elementRef, delta, newPosition) => {
        onResize(e, dir, elementRef, delta, newPosition);
    };
    const onResize = (e, dir, elementRef, delta, newPosition) => {
        const newData = {
            x: newPosition.x,
            y: newPosition.y,
            width: elementRef.offsetWidth,
            height: elementRef.offsetHeight,
        };
        if (isEquals(newData, Object.assign({}, position, size)))
            return;
        updateWidgetConfig(config.id, newData);
        setPosition(Object.assign({}, newData));
        setSize(Object.assign({}, newData));
    };
    return React.createElement(react_rnd_1.Rnd, { position: {
            x: config.x,
            y: config.y
        }, size: {
            width: config.width,
            height: config.height,
        }, dragGrid: [dashboardConfig.stepSize, dashboardConfig.stepSize], resizeGrid: [dashboardConfig.stepSize, dashboardConfig.stepSize], onDragStop: onDragStop, onResizeStop: onResizeStop, onDrag: onDrag, onResize: onResize, disableDragging: isDialogOpen, style: { userSelect: 'none' }, enableUserSelectHack: false },
        React.createElement("div", { className: classNames(classes.body, props.className, { [classes.hiddenMenuIcon]: isIdle }), style: Object.assign({}, themes_1.claudeThemes[dashboardConfig.theme].widget, props.style) }, props.children));
}
exports.default = core_1.withStyles(styles)(WidgetFrame);


/***/ }),

/***/ "./ts/components/WidgetMenu.tsx":
/*!**************************************!*\
  !*** ./ts/components/WidgetMenu.tsx ***!
  \**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const react_fontawesome_1 = __webpack_require__(/*! @fortawesome/react-fontawesome */ "./node_modules/@fortawesome/react-fontawesome/index.es.js");
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const React = __webpack_require__(/*! react */ "react");
const WidgetSettingsDialog_1 = __webpack_require__(/*! ./WidgetSettingsDialog */ "./ts/components/WidgetSettingsDialog.tsx");
const react_redux_1 = __webpack_require__(/*! react-redux */ "react-redux");
const actions_1 = __webpack_require__(/*! ../actions */ "./ts/actions.ts");
const styles = () => core_1.createStyles({
    body: {
        position: 'absolute',
        top: -5,
        right: 5,
        fontSize: 20,
        cursor: 'pointer',
        opacity: 0.2,
        transition: 'opacity 0.3s',
    },
});
function WidgetMenu(props) {
    const [menuAnchorEl, setMenuAnchorEl] = React.useState(null);
    const [isSettingsDialogShown, showSettingDialog] = React.useState(false);
    const { settingsFormFields = [], classes, settings } = props;
    // typescript + generic component + material-ui.withStyles + redux.connect = HELL
    const store = react_redux_1.useStore();
    const submitSettings = (data) => {
        if (props.onBeforeSubmit)
            props.onBeforeSubmit(data);
        store.dispatch(actions_1.updateWidgetConfig(props.id, { settings: data }));
    };
    function openMenu(event) {
        setMenuAnchorEl(event.currentTarget);
    }
    function closeMenu() {
        setMenuAnchorEl(null);
    }
    function openDialog() {
        showSettingDialog(true);
        closeMenu();
        store.dispatch(actions_1.setIsDalogOpen(true));
    }
    return React.createElement("div", { className: classes.body + ' widget-menu' },
        React.createElement("span", { "aria-controls": "widget-menu", "aria-haspopup": "true", onClick: openMenu },
            React.createElement(react_fontawesome_1.FontAwesomeIcon, { icon: "ellipsis-h" })),
        React.createElement(core_1.Menu, { id: "widget-menu", anchorEl: menuAnchorEl, keepMounted: true, open: Boolean(menuAnchorEl), onClose: closeMenu },
            settingsFormFields.length ? React.createElement(core_1.MenuItem, { onClick: openDialog }, "Settings") : null,
            React.createElement(core_1.MenuItem, { onClick: () => store.dispatch(actions_1.removeWidget(props.id)) }, "Remove")),
        React.createElement(WidgetSettingsDialog_1.default, { data: settings, show: isSettingsDialogShown, onClose: () => {
                showSettingDialog(false);
                store.dispatch(actions_1.setIsDalogOpen(false));
            }, submit: submitSettings, fields: settingsFormFields, title: props.dialogTitle, introText: props.dialogText }));
}
exports.default = core_1.withStyles(styles)(WidgetMenu);


/***/ }),

/***/ "./ts/components/WidgetSettingsDialog.tsx":
/*!************************************************!*\
  !*** ./ts/components/WidgetSettingsDialog.tsx ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const React = __webpack_require__(/*! react */ "react");
const react_1 = __webpack_require__(/*! react */ "react");
const react_fontawesome_1 = __webpack_require__(/*! @fortawesome/react-fontawesome */ "./node_modules/@fortawesome/react-fontawesome/index.es.js");
const tools_1 = __webpack_require__(/*! ../tools */ "./ts/tools.ts");
const uuid = __webpack_require__(/*! uuid/v4 */ "./node_modules/uuid/v4.js");
function ListField(props) {
    const { desc, data, onChange } = props;
    const { fields } = desc;
    const defaultRowData = fields.reduce((obj, field) => { obj[field.name] = field.default; return obj; }, {});
    const addRow = () => {
        const id = uuid();
        const dataList = Object.values(data);
        const rank = dataList.length ? Math.max(...dataList.map(r => r.rank)) + 1 : 0;
        onChange(Object.assign({}, data, { [id]: Object.assign({ id, rank }, defaultRowData) }));
    };
    const delRow = (rowId) => _ => {
        let newData = tools_1.copy(data);
        delete newData[rowId];
        onChange(newData);
    };
    const updateCell = (rowId, name) => (val) => {
        let newData = tools_1.copy(data);
        newData[rowId][name] = val;
        onChange(newData);
    };
    const renderCell = (rowData, desc) => {
        return React.createElement("td", { key: `${rowData.id}_${desc.name}` }, fieldGenerator[desc.type || typeof rowData[desc.name]](desc, rowData[desc.name], updateCell(rowData.id, desc.name)));
    };
    const renderRow = (rowData) => {
        return React.createElement("tr", { key: rowData.id },
            fields.map(desc => renderCell(rowData, desc)),
            React.createElement("td", { style: { padding: "0 5px", fontSize: 18, cursor: 'pointer' } },
                React.createElement("div", { onClick: delRow(rowData.id) },
                    React.createElement(react_fontawesome_1.FontAwesomeIcon, { icon: "times" }))));
    };
    return (React.createElement("div", { style: { margin: '10px 0' } },
        React.createElement(core_1.Typography, { component: "span", variant: "subtitle1", style: { marginRight: 10 } },
            desc.label,
            ": "),
        React.createElement(core_1.Button, { variant: "contained", size: "small", onClick: addRow }, "Add"),
        React.createElement("table", null,
            React.createElement("tbody", null, Object.values(data).sort((s1, s2) => s1.rank - s2.rank).map(renderRow)))));
}
const fieldGenerator = {
    checkboxList: (desc, value, onChange) => {
        return (React.createElement("div", { key: desc.name },
            React.createElement(core_1.Typography, { variant: "subtitle1" },
                desc.label,
                ": "),
            desc.options.map(op => (React.createElement(core_1.FormControlLabel, { label: op.label, key: op.value, control: React.createElement(core_1.Checkbox, { checked: value[op.value], onChange: ev => onChange(Object.assign({}, value, { [op.value]: ev.target.checked })), color: "primary", inputProps: { 'aria-label': 'secondary checkbox' } }) })))));
    },
    select: (desc, value, onChange) => {
        return (React.createElement(core_1.FormControl, { fullWidth: true, key: desc.name },
            React.createElement(core_1.InputLabel, null, desc.label),
            React.createElement(core_1.Select, { value: value, onChange: v => onChange(v.target.value) }, desc.options.map(op => React.createElement(core_1.MenuItem, { key: op.value, value: op.value }, op.label)))));
    },
    list: (desc, value, onChange) => {
        return React.createElement(ListField, { desc: desc, data: value, onChange: onChange, key: desc.name });
    },
    string: (desc, value, onChange) => {
        return React.createElement(core_1.TextField, { key: desc.name, id: 'widgetsettings_' + desc.name, margin: "dense", label: desc.label, type: "text", required: desc.required, fullWidth: true, value: value, onChange: ev => onChange(ev.target.value) });
    },
    boolean: (desc, value, onChange) => {
        return React.createElement(core_1.FormControlLabel, { label: desc.label, key: desc.name, control: React.createElement(core_1.Checkbox, { checked: value, onChange: ev => onChange(ev.target.checked), color: "primary", inputProps: { 'aria-label': 'secondary checkbox' } }) });
    },
    number: (desc, value, onChange) => {
        return React.createElement(core_1.TextField
        // TODO: min-max
        , { 
            // TODO: min-max
            key: desc.name, id: 'widgetsettings_' + desc.name, margin: "dense", label: desc.label, type: "number", required: desc.required, fullWidth: true, value: value, onChange: ev => onChange(parseInt(ev.target.value)) });
    },
};
function default_1(props) {
    const { show, onClose, title = 'Widget settings', submit, data, introText } = props;
    const [formData, setFormData] = react_1.useState(Object.assign({}, data));
    const onSubmit = (ev) => {
        ev.preventDefault();
        submit(formData);
        onClose();
    };
    const closeDialog = () => {
        setFormData(data);
        onClose();
    };
    const renderField = (desc) => {
        const fieldType = desc.type || typeof data[desc.name];
        const generator = fieldGenerator[fieldType];
        if (!generator) {
            console.error('Undefined type:', fieldType, desc);
            return null;
        }
        return generator(desc, formData[desc.name], (value) => {
            setFormData(Object.assign({}, formData, { [desc.name]: value }));
        });
    };
    return (React.createElement(core_1.Dialog, { open: show, onClose: closeDialog },
        React.createElement(core_1.DialogTitle, null, title),
        React.createElement("form", { onSubmit: onSubmit },
            React.createElement(core_1.DialogContent, null,
                introText ? React.createElement(core_1.DialogContentText, null, introText) : null,
                props.fields.map(renderField)),
            React.createElement(core_1.DialogActions, null,
                React.createElement(core_1.Button, { onClick: closeDialog, color: "primary" }, "Cancel"),
                React.createElement(core_1.Button, { type: "submit", color: "primary" }, "Submit")))));
}
exports.default = default_1;


/***/ }),

/***/ "./ts/components/tools.tsx":
/*!*********************************!*\
  !*** ./ts/components/tools.tsx ***!
  \*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const React = __webpack_require__(/*! react */ "react");
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const react_1 = __webpack_require__(/*! react */ "react");
exports.dialogTransition = p => React.createElement(core_1.Grow, Object.assign({}, p));
function useInterval(callback, delay) {
    const savedCallback = react_1.useRef();
    react_1.useEffect(() => {
        savedCallback.current = callback;
    });
    react_1.useEffect(() => {
        function tick() {
            savedCallback.current();
        }
        let id = setInterval(tick, delay);
        return () => clearInterval(id);
    }, [delay]);
}
exports.useInterval = useInterval;
function IfComp(props) {
    return React.createElement(React.Fragment, null, props.cond ? props.children : null);
}
exports.IfComp = IfComp;
;


/***/ }),

/***/ "./ts/containers/AddWidgetMenu.tsx":
/*!*****************************************!*\
  !*** ./ts/containers/AddWidgetMenu.tsx ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const React = __webpack_require__(/*! react */ "react");
const widgetRegistry_1 = __webpack_require__(/*! ../widgetRegistry */ "./ts/widgetRegistry.ts");
const react_redux_1 = __webpack_require__(/*! react-redux */ "react-redux");
const react_intl_1 = __webpack_require__(/*! react-intl */ "./node_modules/react-intl/lib/index.js");
function AddWidgetMenu(props) {
    const dbId = props.currentDashboardId;
    const [anchorEl, setAnchorEl] = React.useState(null);
    function handleClick(event) {
        setAnchorEl(event.currentTarget);
    }
    function handleClose() {
        setAnchorEl(null);
    }
    return (React.createElement(React.Fragment, null,
        React.createElement(core_1.Button, { "aria-controls": "simple-menu", "aria-haspopup": "true", variant: "contained", size: "small", color: "primary", onClick: handleClick },
            React.createElement(react_intl_1.FormattedMessage, { id: "controlBar.addWidget" })),
        React.createElement(core_1.Menu, { id: "simple-menu", anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleClose }, Object.keys(widgetRegistry_1.default).sort().map(k => (React.createElement(core_1.MenuItem, { key: k, onClick: props.addWidget.bind(this, k) }, widgetRegistry_1.default[k].title))))));
}
function mapStateToProps(state) {
    const { currentDashboardId } = state;
    return {
        currentDashboardId,
    };
}
exports.default = react_redux_1.connect(mapStateToProps)(AddWidgetMenu);


/***/ }),

/***/ "./ts/containers/App.tsx":
/*!*******************************!*\
  !*** ./ts/containers/App.tsx ***!
  \*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const React = __webpack_require__(/*! react */ "react");
const react_redux_1 = __webpack_require__(/*! react-redux */ "react-redux");
const Dashboard_1 = __webpack_require__(/*! ../components/Dashboard */ "./ts/components/Dashboard.tsx");
const ControlBar_1 = __webpack_require__(/*! ./ControlBar */ "./ts/containers/ControlBar.tsx");
const react_intl_1 = __webpack_require__(/*! react-intl */ "./node_modules/react-intl/lib/index.js");
const moment = __webpack_require__(/*! moment */ "moment");
const locales_1 = __webpack_require__(/*! ../locales */ "./ts/locales.ts");
const styles = () => core_1.createStyles({
    root: {
        height: '100%',
    }
});
const defaultDashboardConfig = {
    id: '',
    name: 'default',
    stepSize: 10,
    theme: 'grey',
    locale: 'en',
};
const App = core_1.withStyles(styles)(React.memo((props) => {
    const { dashboardConfig, widgetConfigs } = props;
    moment.locale(dashboardConfig.locale);
    return React.createElement("div", { className: props.classes.root },
        React.createElement(react_intl_1.IntlProvider, { locale: dashboardConfig.locale, messages: locales_1.claudeLocales[dashboardConfig.locale].flatMessages },
            React.createElement(ControlBar_1.default, null),
            dashboardConfig ? React.createElement(Dashboard_1.default, { config: dashboardConfig, widgets: widgetConfigs }) : null));
}));
function mapStateToProps(state) {
    const { currentDashboardId, dashboards, widgets } = state;
    return {
        dashboardConfig: Object.assign({}, defaultDashboardConfig, dashboards[currentDashboardId]),
        widgetConfigs: Object.values(widgets).filter(w => w.dashboardId == currentDashboardId),
    };
}
exports.default = react_redux_1.connect(mapStateToProps)(App);


/***/ }),

/***/ "./ts/containers/ControlBar.tsx":
/*!**************************************!*\
  !*** ./ts/containers/ControlBar.tsx ***!
  \**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const React = __webpack_require__(/*! react */ "react");
const react_1 = __webpack_require__(/*! react */ "react");
const react_redux_1 = __webpack_require__(/*! react-redux */ "react-redux");
const AddWidgetMenu_1 = __webpack_require__(/*! ./AddWidgetMenu */ "./ts/containers/AddWidgetMenu.tsx");
const DashboardSelector_1 = __webpack_require__(/*! ./DashboardSelector */ "./ts/containers/DashboardSelector.tsx");
const DashboardSettingsButton_1 = __webpack_require__(/*! ./DashboardSettingsButton */ "./ts/containers/DashboardSettingsButton.tsx");
const react_fontawesome_1 = __webpack_require__(/*! @fortawesome/react-fontawesome */ "./node_modules/@fortawesome/react-fontawesome/index.es.js");
const actions_1 = __webpack_require__(/*! ../actions */ "./ts/actions.ts");
const themes_1 = __webpack_require__(/*! ../themes */ "./ts/themes.ts");
const styles = () => core_1.createStyles({
    opener: {
        position: 'fixed',
        left: 5,
        top: 0,
        width: 30,
        height: 30,
        fontSize: 20,
        cursor: 'pointer',
        color: (props) => props.currentDashboard ? themes_1.claudeThemes[props.currentDashboard.theme].controlBar.openerColor : 'grey',
        opacity: (p) => p.isIdle ? 0 : 1,
        transition: 'opacity 1s',
    },
    title: {
        padding: 15,
    },
    menubar: {
        display: 'flex',
        alignItems: 'center',
    },
    spacer: {
        width: 15,
    },
    separator: {
        width: 1,
        borderRight: '1px solid #777',
        marginLeft: 15,
        marginRight: 15,
        height: 25,
    },
    currentDashboard: {
        display: 'flex',
        flexDirection: 'column',
    },
});
const ControlBar = core_1.withStyles(styles)((props) => {
    const [opened, setOpened] = react_1.useState(false);
    const store = react_redux_1.useStore();
    const { classes, currentDashboard, currentDashboardHasWidget, isIdle } = props;
    function Spacer() {
        return React.createElement("div", { className: classes.spacer });
    }
    function Separator() {
        return React.createElement("div", { className: classes.separator });
    }
    const openDrawer = !isIdle && (opened || currentDashboard == undefined || !currentDashboardHasWidget);
    const onAddWidget = (type) => {
        store.dispatch(actions_1.addWidget(currentDashboard.id, type));
        setOpened(false);
    };
    return (React.createElement("div", null,
        React.createElement("div", { className: classes.opener, onClick: () => setOpened(true) },
            React.createElement(react_fontawesome_1.FontAwesomeIcon, { icon: "bars" })),
        React.createElement(core_1.Drawer, { anchor: "top", open: openDrawer, onClose: () => setOpened(false) },
            React.createElement("div", { className: classes.menubar },
                React.createElement("span", { className: classes.title }, "Zsomapell Klod!"),
                React.createElement(DashboardSelector_1.default, null),
                currentDashboard ?
                    React.createElement(React.Fragment, null,
                        React.createElement(Separator, null),
                        React.createElement("div", null, currentDashboard.name),
                        React.createElement(Spacer, null),
                        React.createElement(DashboardSettingsButton_1.default, null),
                        React.createElement(Spacer, null),
                        React.createElement(AddWidgetMenu_1.default, { addWidget: onAddWidget })) : null))));
});
function mapStateToProps(state) {
    const { currentDashboardId, widgets, dashboards, isIdle } = state;
    return {
        isIdle,
        currentDashboard: dashboards[currentDashboardId],
        currentDashboardHasWidget: Object.values(widgets).find(w => w.dashboardId == currentDashboardId) != undefined,
    };
}
exports.default = react_redux_1.connect(mapStateToProps)(ControlBar);


/***/ }),

/***/ "./ts/containers/DashboardSelector.tsx":
/*!*********************************************!*\
  !*** ./ts/containers/DashboardSelector.tsx ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const react_fontawesome_1 = __webpack_require__(/*! @fortawesome/react-fontawesome */ "./node_modules/@fortawesome/react-fontawesome/index.es.js");
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const React = __webpack_require__(/*! react */ "react");
const react_redux_1 = __webpack_require__(/*! react-redux */ "react-redux");
const redux_1 = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
const actions_1 = __webpack_require__(/*! ../actions */ "./ts/actions.ts");
const DashboardConfigDialog_1 = __webpack_require__(/*! ../components/DashboardConfigDialog */ "./ts/components/DashboardConfigDialog.tsx");
const react_intl_1 = __webpack_require__(/*! react-intl */ "./node_modules/react-intl/lib/index.js");
function DashboardSelector(props) {
    const [anchorEl, setAnchorEl] = React.useState(null);
    const [isDialogShown, showDialog] = React.useState(false);
    const [name, setName] = React.useState('');
    const [stepSize, setStepSize] = React.useState(10);
    function openMenu(event) {
        setAnchorEl(event.currentTarget);
    }
    function closeMenu() {
        setAnchorEl(null);
    }
    function chooseMenu(id) {
        props.selectDashboard(id);
        closeMenu();
    }
    function closeDialog() {
        showDialog(false);
        setName('');
        setStepSize(10);
    }
    function openDialog() {
        showDialog(true);
        closeMenu();
    }
    const submit = (data) => {
        props.addDashboard(data.name, data.stepSize);
        closeDialog();
    };
    const dashboards = Object.values(props.dashboards);
    return (React.createElement(React.Fragment, null,
        React.createElement(core_1.Button, { "aria-controls": "DashboardSelector", "aria-haspopup": "true", variant: "contained", size: "small", color: "primary", onClick: openMenu },
            React.createElement(react_intl_1.FormattedMessage, { id: "controlBar.dashboards" })),
        React.createElement(core_1.Menu, { id: "DashboardSelector", anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: closeMenu },
            React.createElement(core_1.MenuItem, { key: 0, onClick: openDialog },
                React.createElement(react_intl_1.FormattedMessage, { id: "controlBar.newDashboard" })),
            dashboards.length ? React.createElement(core_1.Divider, null) : null,
            dashboards.map(d => React.createElement(core_1.MenuItem, { key: d.id, onClick: chooseMenu.bind(this, d.id) },
                React.createElement(core_1.ListItemIcon, null, d.id == props.currentDashboardId ? React.createElement(react_fontawesome_1.FontAwesomeIcon, { icon: "check" }) : React.createElement("span", null)),
                d.name))),
        React.createElement(DashboardConfigDialog_1.default, { show: isDialogShown, title: "Dashboard settings", onClose: closeDialog, submit: submit })));
}
function mapStateToProps(state) {
    const { currentDashboardId, dashboards } = state;
    return {
        currentDashboardId,
        dashboards,
    };
}
// TODO: typize
const mapDispatchToProps = dispatch => redux_1.bindActionCreators({ selectDashboard: actions_1.selectDashboard, addDashboard: actions_1.addDashboard }, dispatch);
exports.default = react_redux_1.connect(mapStateToProps, mapDispatchToProps)(DashboardSelector);


/***/ }),

/***/ "./ts/containers/DashboardSettingsButton.tsx":
/*!***************************************************!*\
  !*** ./ts/containers/DashboardSettingsButton.tsx ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const React = __webpack_require__(/*! react */ "react");
const react_1 = __webpack_require__(/*! react */ "react");
const DashboardConfigDialog_1 = __webpack_require__(/*! ../components/DashboardConfigDialog */ "./ts/components/DashboardConfigDialog.tsx");
const react_redux_1 = __webpack_require__(/*! react-redux */ "react-redux");
const actions_1 = __webpack_require__(/*! ../actions */ "./ts/actions.ts");
const react_intl_1 = __webpack_require__(/*! react-intl */ "./node_modules/react-intl/lib/index.js");
const DashboardSettingsButton = (props) => {
    const [isShowDialog, showDialog] = react_1.useState(false);
    const onButtonClick = () => {
        showDialog(true);
    };
    const closeDialog = () => {
        showDialog(false);
    };
    const submit = (data) => {
        props.updateDashboard(data);
        closeDialog();
    };
    return React.createElement(React.Fragment, null,
        React.createElement(core_1.Button, { variant: "contained", size: "small", color: "primary", onClick: onButtonClick },
            React.createElement(react_intl_1.FormattedMessage, { id: "controlBar.settings" })),
        React.createElement(DashboardConfigDialog_1.default, { show: isShowDialog, title: "Dashboard settings", onClose: closeDialog, submit: submit, data: props.data }));
};
function mapStateToProps(state) {
    const { currentDashboardId, dashboards } = state;
    return {
        data: dashboards[currentDashboardId]
    };
}
const mapDispatchToProps = (dispatch) => {
    return {
        updateDashboard: data => dispatch(actions_1.updateDashboard(data))
    };
};
exports.default = react_redux_1.connect(mapStateToProps, mapDispatchToProps)(DashboardSettingsButton);


/***/ }),

/***/ "./ts/containers/WidgetFrame.ts":
/*!**************************************!*\
  !*** ./ts/containers/WidgetFrame.ts ***!
  \**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const react_redux_1 = __webpack_require__(/*! react-redux */ "react-redux");
const redux_1 = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
const actions_1 = __webpack_require__(/*! ../actions */ "./ts/actions.ts");
const WidgetFrame_1 = __webpack_require__(/*! ../components/WidgetFrame */ "./ts/components/WidgetFrame.tsx");
function mapStateToProps(state) {
    const { isDialogOpen, isIdle } = state;
    return {
        isDialogOpen,
        isIdle,
    };
}
const mapDispatchToProps = dispatch => redux_1.bindActionCreators({ updateWidgetConfig: actions_1.updateWidgetConfig }, dispatch);
exports.default = react_redux_1.connect(mapStateToProps, mapDispatchToProps)(WidgetFrame_1.default);


/***/ }),

/***/ "./ts/index.tsx":
/*!**********************!*\
  !*** ./ts/index.tsx ***!
  \**********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const fontawesome_svg_core_1 = __webpack_require__(/*! @fortawesome/fontawesome-svg-core */ "@fortawesome/fontawesome-svg-core");
const free_solid_svg_icons_1 = __webpack_require__(/*! @fortawesome/free-solid-svg-icons */ "@fortawesome/free-solid-svg-icons");
const free_brands_svg_icons_1 = __webpack_require__(/*! @fortawesome/free-brands-svg-icons */ "@fortawesome/free-brands-svg-icons");
const core_1 = __webpack_require__(/*! @material-ui/core */ "@material-ui/core");
const React = __webpack_require__(/*! react */ "react");
const ReactDOM = __webpack_require__(/*! react-dom */ "react-dom");
const react_redux_1 = __webpack_require__(/*! react-redux */ "react-redux");
const App_1 = __webpack_require__(/*! ./containers/App */ "./ts/containers/App.tsx");
const store_1 = __webpack_require__(/*! ./store */ "./ts/store.ts");
const actions_1 = __webpack_require__(/*! ./actions */ "./ts/actions.ts");
fontawesome_svg_core_1.library.add(free_solid_svg_icons_1.fas, free_brands_svg_icons_1.fab);
const store = store_1.default();
const darkTheme = core_1.createMuiTheme({
    palette: {
        type: 'dark',
        primary: core_1.colors.cyan,
        secondary: core_1.colors.pink,
    },
});
ReactDOM.render(React.createElement(React.Fragment, null,
    React.createElement(core_1.CssBaseline, null),
    React.createElement(react_redux_1.Provider, { store: store },
        React.createElement(core_1.MuiThemeProvider, { theme: darkTheme },
            React.createElement(App_1.default, null)))), document.getElementById("body"));
var idleIntervalId = 0;
function resetIdleTimer() {
    clearInterval(idleIntervalId);
    if (store.getState().isIdle)
        store.dispatch(actions_1.setIdle(false));
    idleIntervalId = window.setTimeout(() => {
        store.dispatch(actions_1.setIdle(true));
    }, 60000);
}
window.onmousemove = resetIdleTimer;


/***/ }),

/***/ "./ts/locales.ts":
/*!***********************!*\
  !*** ./ts/locales.ts ***!
  \***********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
class LocaleData {
    constructor(title, moment, messages) {
        this.flatCache = null;
        this.title = title;
        this.moment = moment;
        this.messages = messages;
    }
    get flatMessages() {
        if (this.flatCache)
            return this.flatCache;
        this.flatCache = {};
        const iter = (data, prefix) => {
            for (const [key, value] of Object.entries(data)) {
                if (value instanceof Object)
                    iter(value, `${key}.`);
                else
                    this.flatCache[`${prefix}${key}`] = value;
            }
        };
        iter(this.messages, '');
        return this.flatCache;
    }
}
exports.LocaleData = LocaleData;
exports.claudeLocales = {
    en: new LocaleData('English', 'en-gb', {
        controlBar: {
            dashboards: 'dashboards',
            newDashboard: 'Create new dashboard',
            language: 'locale',
            settings: 'settings',
            addWidget: 'add widget',
        },
    }),
    hu: new LocaleData('Hungarian', 'hu', {
        // controlBar: {
        //     dashboards: 'műszerfalak',
        //     newDashboard: 'Új műszerfal',
        //     language: 'nyelv',
        //     settings: 'beállítások',
        //     addWidget: 'műszer hozzáadása',
        // },
        controlBar: {
            dashboards: 'dashboards',
            newDashboard: 'Create new dashboard',
            language: 'locale',
            settings: 'settings',
            addWidget: 'add widget',
        },
    }),
};


/***/ }),

/***/ "./ts/reducers.ts":
/*!************************!*\
  !*** ./ts/reducers.ts ***!
  \************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const objectAssignDeep = __webpack_require__(/*! object-assign-deep */ "./node_modules/object-assign-deep/objectAssignDeep.js");
const redux_1 = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
const actions_1 = __webpack_require__(/*! ./actions */ "./ts/actions.ts");
const tools_1 = __webpack_require__(/*! ./tools */ "./ts/tools.ts");
const widgetRegistry_1 = __webpack_require__(/*! ./widgetRegistry */ "./ts/widgetRegistry.ts");
function mergeResource(old, new_) {
    return Object.assign({}, old, new_);
}
const dashboardHandlers = {
    [actions_1.Action.ADD_DASHBOARD]: (state, action) => {
        return mergeResource(state, {
            [action.id]: {
                id: action.id,
                name: action.name,
                stepSize: action.stepSize,
                theme: 'blue',
                locale: 'en',
            }
        });
    },
    [actions_1.Action.UPDATE_DASHBOARD]: (state, action) => {
        return mergeResource(state, { [action.data.id]: action.data });
    },
};
const widgetHandlers = {
    [actions_1.Action.ADD_WIDGET]: (state, action) => {
        return mergeResource(state, {
            [action.id]: {
                id: action.id,
                type: action.widgetType,
                x: 10,
                y: 10,
                width: widgetRegistry_1.default[action.widgetType].defaultSize.w,
                height: widgetRegistry_1.default[action.widgetType].defaultSize.h,
                settings: {},
                dashboardId: action.dashboardId,
            }
        });
    },
    [actions_1.Action.UPDATE_WIDGET_CONFIG]: (state, action) => {
        let newState = objectAssignDeep({}, state, { [action.widgetId]: action.config });
        if (action.config.settings)
            newState[action.widgetId].settings = action.config.settings;
        return newState;
    },
    [actions_1.Action.REMOVE_WIDGET]: (state, action) => {
        let newState = Object.assign({}, state);
        delete newState[action.widgetId];
        return newState;
    },
};
function currentDashboardId(state = tools_1.claudeLocalStorage.currentDashboardId, action) {
    if (action.type == actions_1.Action.SELECT_DASHBOARD) {
        return action.id;
    }
    return state;
}
function dashboards(state = {}, action) {
    if (action.type in dashboardHandlers)
        return dashboardHandlers[action.type](state, action);
    return state;
}
function widgets(state = {}, action) {
    if (action.type in widgetHandlers)
        return widgetHandlers[action.type](state, action);
    return state;
}
function isDialogOpen(state = false, action) {
    if (action.type == actions_1.Action.IS_DALOG_OPEN)
        return action.isOpen;
    return state;
}
function isIdle(state = false, action) {
    if (action.type == actions_1.Action.SET_IDLE)
        return action.isIdle;
    return state;
}
const rootReducer = redux_1.combineReducers({
    currentDashboardId,
    dashboards,
    widgets,
    isDialogOpen,
    isIdle,
});
exports.default = rootReducer;


/***/ }),

/***/ "./ts/store.ts":
/*!*********************!*\
  !*** ./ts/store.ts ***!
  \*********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const redux_1 = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
const redux_logger_1 = __webpack_require__(/*! redux-logger */ "./node_modules/redux-logger/dist/redux-logger.js");
const reducers_1 = __webpack_require__(/*! ./reducers */ "./ts/reducers.ts");
const ConfigSyncService_1 = __webpack_require__(/*! ./ConfigSyncService */ "./ts/ConfigSyncService.ts");
const loggerMiddleware = redux_logger_1.createLogger();
const initalData = window['initalData'];
function configureStore() {
    console.debug("Store initial data", initalData);
    let store = redux_1.createStore(reducers_1.default, initalData, redux_1.applyMiddleware(ConfigSyncService_1.default.createReduxMiddleware(), loggerMiddleware));
    ConfigSyncService_1.default.dispatcher = store.dispatch;
    return store;
}
exports.default = configureStore;


/***/ }),

/***/ "./ts/themes.ts":
/*!**********************!*\
  !*** ./ts/themes.ts ***!
  \**********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.claudeThemes = {
    blue: {
        title: 'Blue',
        controlBar: {
            openerColor: 'white',
        },
        dashboard: {
            backgroundImage: 'url(/static/pics/canvas_blue_texture_surface_shadow_44965_1920x1200.jpg)'
        },
        widget: {
            color: '#eee',
            backgroundColor: 'rgba(0,0,0,0.4)',
        },
        calendar: {
            today: {
                borderRadius: 100,
                border: '3px solid #eee',
            },
        },
    },
    grey: {
        title: 'Grey',
        controlBar: {
            openerColor: 'white',
        },
        dashboard: {
            backgroundColor: '#333',
        },
        widget: {
            color: '#eee',
            backgroundColor: 'rgba(0,0,0,0.3)',
        },
        calendar: {
            today: {
                backgroundColor: 'rgba(255,255,255,0.2)',
            },
        },
    },
};


/***/ }),

/***/ "./ts/tools.ts":
/*!*********************!*\
  !*** ./ts/tools.ts ***!
  \*********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const types_1 = __webpack_require__(/*! ./types */ "./ts/types.ts");
const localStorageHandler = {
    get: (target, name) => {
        const res = window.localStorage.getItem(name);
        return res == undefined ? target[name] : JSON.parse(res);
    },
    set: (target, name, value, receiver) => {
        window.localStorage.setItem(name, JSON.stringify(value));
        return true;
    },
};
exports.claudeLocalStorage = new Proxy(new types_1.LocalStorageSchema(), localStorageHandler);
function copy(data) {
    return JSON.parse(JSON.stringify(data));
}
exports.copy = copy;
var WidgetStyle;
(function (WidgetStyle) {
    function getRelativeSize(ratio) {
        return {
            width: (props) => props.config.width * ratio,
            height: (props) => props.config.height * ratio,
        };
    }
    WidgetStyle.getRelativeSize = getRelativeSize;
})(WidgetStyle = exports.WidgetStyle || (exports.WidgetStyle = {}));
function capitalizeFirstLetter(string) {
    return string.charAt(0).toUpperCase() + string.slice(1);
}
exports.capitalizeFirstLetter = capitalizeFirstLetter;
exports.isObject = function (a) {
    return (!!a) && (a.constructor === Object);
};
function convertKeysToCamelCase(data) {
    let res = {};
    for (const key in data) {
        let newKey = key.split(/-|_/).map(s => capitalizeFirstLetter(s)).join('');
        let value = data[key];
        res[newKey.charAt(0).toLowerCase() + newKey.slice(1)] = exports.isObject(value) ? convertKeysToCamelCase(value) : value;
    }
    return res;
}
exports.convertKeysToCamelCase = convertKeysToCamelCase;
function humanFileSize(bytes, si = false) {
    var thresh = si ? 1000 : 1024;
    if (Math.abs(bytes) < thresh) {
        return bytes + ' B';
    }
    var units = si
        ? ['kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
        : ['KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'];
    var u = -1;
    do {
        bytes /= thresh;
        ++u;
    } while (Math.abs(bytes) >= thresh && u < units.length - 1);
    return bytes.toFixed(1) + ' ' + units[u];
}
exports.humanFileSize = humanFileSize;


/***/ }),

/***/ "./ts/types.ts":
/*!*********************!*\
  !*** ./ts/types.ts ***!
  \*********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
class BaseWidgetSettings {
}
exports.BaseWidgetSettings = BaseWidgetSettings;
class LocalStorageSchema {
    constructor() {
        this.currentDashboardId = ''; // move to url?
    }
}
exports.LocalStorageSchema = LocalStorageSchema;


/***/ }),

/***/ "./ts/widgetRegistry.ts":
/*!******************************!*\
  !*** ./ts/widgetRegistry.ts ***!
  \******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const ClockWidget_1 = __webpack_require__(/*! ./components/ClockWidget */ "./ts/components/ClockWidget.tsx");
const ServerStatusWidget_1 = __webpack_require__(/*! ./components/ServerStatusWidget */ "./ts/components/ServerStatusWidget.tsx");
const CalendarWidget_1 = __webpack_require__(/*! ./components/CalendarWidget */ "./ts/components/CalendarWidget.tsx");
const StorageStatusWidget_1 = __webpack_require__(/*! ./components/StorageStatusWidget */ "./ts/components/StorageStatusWidget.tsx");
const InfluxTable_1 = __webpack_require__(/*! ./components/InfluxTable */ "./ts/components/InfluxTable.tsx");
const IdokepCurrent_1 = __webpack_require__(/*! ./components/IdokepCurrent */ "./ts/components/IdokepCurrent.tsx");
const IdokepDays_1 = __webpack_require__(/*! ./components/IdokepDays */ "./ts/components/IdokepDays.tsx");
const IdokepHours_1 = __webpack_require__(/*! ./components/IdokepHours */ "./ts/components/IdokepHours.tsx");
const ChromecastWidget_1 = __webpack_require__(/*! ./components/ChromecastWidget */ "./ts/components/ChromecastWidget.tsx");
const TransmissionWidget_1 = __webpack_require__(/*! ./components/TransmissionWidget */ "./ts/components/TransmissionWidget.tsx");
let reg = {
    storages: {
        factory: StorageStatusWidget_1.default,
        title: 'Storage status',
        settingsType: StorageStatusWidget_1.Settings,
        defaultSize: { w: 400, h: 200 },
    },
    clock: {
        factory: ClockWidget_1.default,
        title: 'Clock',
        settingsType: ClockWidget_1.Settings,
        defaultSize: { w: 450, h: 200 },
    },
    serverStatus: {
        factory: ServerStatusWidget_1.default,
        title: 'Server status',
        settingsType: ServerStatusWidget_1.Settings,
        defaultSize: { w: 400, h: 200 },
    },
    calendar: {
        factory: CalendarWidget_1.default,
        title: 'Calendar',
        settingsType: CalendarWidget_1.Settings,
        defaultSize: { w: 250, h: 250 },
    },
    influxTable: {
        factory: InfluxTable_1.default,
        title: 'Influx table',
        settingsType: InfluxTable_1.Settings,
        defaultSize: { w: 300, h: 150 },
    },
    idokepCurrent: {
        factory: IdokepCurrent_1.default,
        title: 'Idokep / Current',
        settingsType: IdokepCurrent_1.Settings,
        defaultSize: { w: 220, h: 280 },
    },
    idokepDays: {
        factory: IdokepDays_1.default,
        title: 'Idokep / Days',
        settingsType: IdokepDays_1.Settings,
        defaultSize: { w: 400, h: 200 },
    },
    idokepHours: {
        factory: IdokepHours_1.default,
        title: 'Idokep / Hours',
        settingsType: IdokepHours_1.Settings,
        defaultSize: { w: 400, h: 200 },
    },
    chromecast: {
        factory: ChromecastWidget_1.default,
        title: 'Chromecast',
        settingsType: ChromecastWidget_1.Settings,
        defaultSize: { w: 600, h: 300 },
    },
    transmission: {
        factory: TransmissionWidget_1.default,
        title: 'Transmission',
        settingsType: TransmissionWidget_1.Settings,
        defaultSize: { w: 600, h: 300 },
    },
};
exports.default = reg;


/***/ }),

/***/ "@fortawesome/fontawesome-svg-core":
/*!***************************************!*\
  !*** external "fontawesome-svg-core" ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE__fortawesome_fontawesome_svg_core__;

/***/ }),

/***/ "@fortawesome/free-brands-svg-icons":
/*!****************************************!*\
  !*** external "free-brands-svg-icons" ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE__fortawesome_free_brands_svg_icons__;

/***/ }),

/***/ "@fortawesome/free-solid-svg-icons":
/*!***************************************!*\
  !*** external "free-solid-svg-icons" ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE__fortawesome_free_solid_svg_icons__;

/***/ }),

/***/ "@material-ui/core":
/*!*****************************!*\
  !*** external "MaterialUI" ***!
  \*****************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE__material_ui_core__;

/***/ }),

/***/ "moment":
/*!*************************!*\
  !*** external "moment" ***!
  \*************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE_moment__;

/***/ }),

/***/ "prop-types":
/*!****************************!*\
  !*** external "PropTypes" ***!
  \****************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE_prop_types__;

/***/ }),

/***/ "react":
/*!************************!*\
  !*** external "React" ***!
  \************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE_react__;

/***/ }),

/***/ "react-dom":
/*!***************************!*\
  !*** external "ReactDOM" ***!
  \***************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE_react_dom__;

/***/ }),

/***/ "react-draggable":
/*!*********************************!*\
  !*** external "ReactDraggable" ***!
  \*********************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE_react_draggable__;

/***/ }),

/***/ "react-redux":
/*!*****************************!*\
  !*** external "ReactRedux" ***!
  \*****************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE_react_redux__;

/***/ }),

/***/ "recharts":
/*!***************************!*\
  !*** external "Recharts" ***!
  \***************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE_recharts__;

/***/ })

/******/ });
});
//# sourceMappingURL=bundle.js.map